protected override System.Xml.XmlReader GetReaderForMessage(System.Web.Services.Protocols.SoapClientMessage message, int bufferSize)
        {
            System.Xml.XmlReader reader = base.GetReaderForMessage(message, bufferSize);

            if (m_ForceSOAP12)
            {
                StringBuilder sb = new StringBuilder();
                while (reader.Read())
                {
                    sb.AppendLine(reader.ReadOuterXml());
                }
                /**/
                String content = sb.ToString();
                content = content.Replace(@"http://schemas.xmlsoap.org/soap/envelope/", @"http://www.w3.org/2003/05/soap-envelope");
                content = content.Replace(@"http://schemas.xmlsoap.org/soap/encoding/", @"http://www.w3.org/2003/05/soap-encoding");
                /**/
                //String content = sb.ToString();
                //System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
                //doc.Load(reader);
                //string content = doc.InnerXml.ToString();
                //content = content
                //   .Replace(@"http://schemas.xmlsoap.org/soap/envelope/", @"http://www.w3.org/2003/05/soap-envelope")
                //   .Replace(@"http://schemas.xmlsoap.org/soap/encoding/", @"http://www.w3.org/2003/05/soap-encoding");
                System.Xml.XmlReader reader2 = System.Xml.XmlReader.Create(new System.IO.StringReader(content));
                return(reader2);
            }
            else
            {
                return(reader);
            }
        }
示例#2
0
 protected override System.Xml.XmlWriter GetWriterForMessage(System.Web.Services.Protocols.SoapClientMessage message, int bufferSize)
 {
     message.Headers.Add(new UsernameSoapHeader("Username"));
     message.Headers.Add(new PasswordSoapHeader("Password"));
     message.Headers.Add(new MessageIDSoapHeader(MessageID));
     return(base.GetWriterForMessage(message, bufferSize));
 }
        protected override XmlReader GetReaderForMessage(System.Web.Services.Protocols.SoapClientMessage message, int bufferSize)
        {
            XmlReader rdr = base.GetReaderForMessage(message, bufferSize);

            _xmlReaderSpy = new XmlReaderSpy((XmlReader)rdr);
            return(_xmlReaderSpy);
        }
示例#4
0
 protected override XmlWriter GetWriterForMessage(System.Web.Services.Protocols.SoapClientMessage message, int bufferSize)
 {
     if (!AgsLogger.IsLogging)
     {
         return(base.GetWriterForMessage(message, bufferSize));
     }
     else
     {
         return(new AgsLoggingXmlWriter(message.Stream));
     }
 }
 protected override System.Xml.XmlWriter GetWriterForMessage(System.Web.Services.Protocols.SoapClientMessage message, int bufferSize)
 {
     System.Xml.XmlWriter writer = base.GetWriterForMessage(message, bufferSize);
     return(writer);
 }