当前位置: 首页 > news >正文

公司网站建站/网站建设方案开发

公司网站建站,网站建设方案开发,如何选择做网站的公司,营销型网站建设明细报原文:构建安全的Xml Web Service系列之如何察看SoapMessage上一篇文章地址:构建安全的Xml Web Service系列一之初探使用Soap头 (5-22 12:53) 要分析Xml Web Service的安全性,首先要解决的问题是我们能了解和清楚Soap消息的格式和内容&#xff0…
原文:构建安全的Xml Web Service系列之如何察看SoapMessage

    上一篇文章地址:构建安全的Xml Web Service系列一之初探使用Soap头 (5-22 12:53)    
     要分析Xml Web Service的安全性,首先要解决的问题是我们能了解和清楚Soap消息的格式和内容,如果获得不了SoapMessage,分析如何能构建安全Xml web service也就无从下手,即使分析出来,自己也可 能模模糊糊,不能定论。下面就分析下如何获得SoapMessage。
    首先介绍一个类-SoapExtension,msdn对这个类的备注为:ASP.NET 允许通过扩展性机制生成与 SOAP 相关的基础结构。ASP.NET SOAP 扩展结构以一种扩展为中心,该扩展可以在客户端或服务器上处理消息时在特定阶段中检查或修改消息。ASP.NET SOAP 扩展从 SoapExtension 类派生。GetInitializer 和 Initialize 方法提供其他可用机制,用于初始化 SOAP 扩展以增强性能。ProcessMessage 是大多数 SOAP 扩展的核心,原因是该方法在 SoapMessageStage 中定义的每一个阶段都被调用,从而使 SOAP 扩展得以执行所需的该特定 SOAP 扩展的行为。对于需要修改 SOAP 请求或 SOAP 响应的 SOAP 扩展,ChainStream 提供一个机会以接收要通过网络发送的建议数据。 仔细阅读这段文字,如果您以前开发过windows程序,那第一个应该想到的是:原来web service的处理机制和windows窗口程序的消息机制竟然有着一曲同工之妙。下面谈谈如何利用这个类,来截获Xml web Service请求和相应的Soap消息,从而看看xml web service的庐山真面目。
    首先大家先看看这个类,这个类完成的功能是将Xml Web Service通过扩展的方式,将每次的请求和响应的Soap消息通过日志的方式保存到文本文件中。日志记录的方式也有两种:
    1。针对每个WebMethod产生一个日志文件。
    2。针对每个WebService产生一个日志文件
 因为一个WebService可能包含一个或者多个WebMethod,所以如果指定两种方法都支持的话,那第二个日志两面应该包括第一个日志里面的内容,而有些情况下,是不需要对每个WebMethod都进行日志记录的,这时候采用第一种记录方式,增强了系统的灵活性。 
下面是扩展了的SoapExtension

img_a6339ee3e57d1d52bc7d02b338e15a60.gif <webServices>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        
<soapExtensionTypes>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif          
<add type="Jillzhang.TraceExtension,Jillzhang" priority="1"  group="High"  />
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        
</soapExtensionTypes>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif      
</webServices>
img_1c53668bcee393edac0d7b3b3daff1ae.gifimg_405b18b4b6584ae338e0f6ecaf736533.gif可以记录SoapMessage的SoapExtension
img_a6339ee3e57d1d52bc7d02b338e15a60.gifnamespace Jillzhang
img_a6339ee3e57d1d52bc7d02b338e15a60.gif{
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    public class TraceExtension: SoapExtension
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        static readonly string LogRoot = System.Configuration.ConfigurationManager.AppSettings["logRoot"];
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        Stream oldStream;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        Stream newStream;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        string filename;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif       /// 
<summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif       /// 将请求流和响应流存到内存流中,已被调用
img_a6339ee3e57d1d52bc7d02b338e15a60.gif       /// 
</summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<param name="stream">包含 SOAP 请求或响应的内存缓冲区</param>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<returns>它表示此 SOAP 扩展可以修改的新内存缓冲区。</returns>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public override Stream ChainStream(Stream stream)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            oldStream = stream;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            newStream = new MemoryStream();
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            return newStream;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 在Xml Web Service第一次运行的时候,一次性的将通过TraceExtensionAttribute传递进来的
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 保存日志信息的文件名初始化
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
</summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<param name="methodInfo">应用 SOAP 扩展的 XML Web services 方法的特定函数原型</param>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<param name="attribute">应用于 XML Web services 方法的 SoapExtensionAttribute</param>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<returns>SOAP 扩展将对其进行初始化以用于缓存</returns>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            return ((TraceExtensionAttribute)attribute).Filename;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 替代为每个方法配置的保存SoapMessage文件名,而是将整个网络服务
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 的SoapMessage都保存到一个日志文件中,这个文件路径需要在Web Service
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 的配置文件中web.config指出,如
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<appSettings>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        ///  
<add key="logRoot" value="c:\\serviceLog"/>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
</appSettings>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
</summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<param name="WebServiceType">网络服务的类型</param>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<returns>用于保存日志记录的文件路径</returns>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public override object GetInitializer(Type WebServiceType)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            //return LogRoot.TrimEnd('\\') + "\\" + WebServiceType.FullName + ".log";
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            return LogRoot.TrimEnd('\\')+"\\"+ WebServiceType.FullName + ".log";
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        //获得文件名,并将其保存下来
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public override void Initialize(object initializer)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            filename = (string)initializer;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif       /// 
<summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif       /// 当数据还为Soap格式的时候,将数据写入日志
img_a6339ee3e57d1d52bc7d02b338e15a60.gif       /// 
</summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif       /// 
<param name="message"></param>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public override void ProcessMessage(SoapMessage message)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            switch (message.Stage)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                case SoapMessageStage.BeforeSerialize:
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                    break;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                case SoapMessageStage.AfterSerialize:
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                    WriteOutput(message);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                    break;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                case SoapMessageStage.BeforeDeserialize:
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                    WriteInput(message);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                    break;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                case SoapMessageStage.AfterDeserialize:
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                    break;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                default:
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                    throw new Exception("invalid stage");
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 将SoapMessage写入到日志文件
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
</summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<param name="message"></param>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public void WriteOutput(SoapMessage message)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            newStream.Position = 0; 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            //创建或追加记录文件
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            FileStream fs = new FileStream(filename, FileMode.Append,
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                FileAccess.Write);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            StreamWriter w = new StreamWriter(fs);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            string soapString = (message is SoapServerMessage) ? "Soap响应" : "Soap请求";
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            w.WriteLine("-----" + soapString + " 在 " + DateTime.Now.ToString("yyyy年MM月dd日 HH时mm分ss秒"));
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            w.Flush();
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            Copy(newStream, fs);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            w.Close();
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            newStream.Position = 0;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            Copy(newStream, oldStream);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public void WriteInput(SoapMessage message)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            Copy(oldStream, newStream);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            FileStream fs = new FileStream(filename, FileMode.Append,
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                FileAccess.Write);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            StreamWriter w = new StreamWriter(fs);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            string soapString = (message is SoapServerMessage) ?
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                 "Soap请求" : "Soap响应";
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            w.WriteLine("-----" + soapString +
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                " 在 " + DateTime.Now.ToString("yyyy年MM月dd日 HH时mm分ss秒"));
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            w.Flush();
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            newStream.Position = 0;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            Copy(newStream, fs);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            w.Close();
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            newStream.Position = 0;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 拷贝流到流
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
</summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<param name="from"></param>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<param name="to"></param>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        void Copy(Stream from, Stream to)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            TextReader reader = new StreamReader(from);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            TextWriter writer = new StreamWriter(to);
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            writer.WriteLine(reader.ReadToEnd());
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            writer.Flush();
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    //创建一个用于在WebMethod上使用的SoapExtension属性
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    [AttributeUsage(AttributeTargets.Method)]
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    public class TraceExtensionAttribute : SoapExtensionAttribute
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        private string filename = "c:\\log.txt";
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        private int priority;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 扩展类型
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
</summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public override Type ExtensionType
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            get { return typeof(TraceExtension); }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 优先级 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
</summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public override int Priority
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            get { return priority; }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            set { priority = value; }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
<summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 用于记录该WebMethod的SoapMessage的文件的绝对路径
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 默认为c:\\log.txt;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        /// 
</summary>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public string Filename
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            get
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                return filename;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            set
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                filename = value;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    }   
img_a6339ee3e57d1d52bc7d02b338e15a60.gif}
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
结下来,介绍一个如何使用该类:
如果要使让TraceExtension支持第一种记录方式,需要作的额外工作为:
只需要在要记录SoapMessage的WebMethod添加如下的Attribute
[TraceExtension(Filename="d:\\data.xml",Priority=0)]
当然路径,您可以自己设定
前一节的WebMethod就变成了
img_1c53668bcee393edac0d7b3b3daff1ae.gifimg_405b18b4b6584ae338e0f6ecaf736533.gif添加了针对WebMethod日志记录的WebMethod
img_a6339ee3e57d1d52bc7d02b338e15a60.gif public MySoapHeader header = new MySoapHeader();        
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        [WebMethod]
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        [SoapHeader("header")]   
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        [TraceExtension(Filename="d:\\data.xml",Priority=0)]
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        public string HelloWorld()
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            if (header == null)
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                return "您没有设置SoapHeader,不能正常访问此服务!";
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            if (header.UserName != "jillzhang" || header.Pwd != "123456")
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            {
img_a6339ee3e57d1d52bc7d02b338e15a60.gif                return "您提供的身份验证信息有误,不能正常访问此服务!";
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            }
img_a6339ee3e57d1d52bc7d02b338e15a60.gif            return "Hello World";
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        }
调用下该WebService,便在d盘产生一个data.xml文件,里面的内容为:
img_1c53668bcee393edac0d7b3b3daff1ae.gifimg_405b18b4b6584ae338e0f6ecaf736533.gif日志记录
img_a6339ee3e57d1d52bc7d02b338e15a60.gif-----Soap请求 在 2007年05月25日 09时06分29秒
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><MySoapHeader xmlns="http://tempuri.org/"><UserName>jillzhang</UserName><Pwd>123456</Pwd></MySoapHeader></soap:Header><soap:Body><HelloWorld xmlns="http://tempuri.org/" /></soap:Body></soap:Envelope>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif-----Soap响应 在 2007年05月25日 09时06分29秒
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><HelloWorldResponse xmlns="http://tempuri.org/"><HelloWorldResult>Hello World</HelloWorldResult></HelloWorldResponse></soap:Body></soap:Envelope>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
如何采用第二种方法,让WebService的每个WebMethod都能记录日志
需要在Web.config中作如下的设定
首先添加如下节点
img_a6339ee3e57d1d52bc7d02b338e15a60.gif <webServices>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        
<soapExtensionTypes>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif          
<add type="Jillzhang.TraceExtension,Jillzhang" priority="1"  group="High"  />
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        
</soapExtensionTypes>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif      
</webServices>
然后通过配置设定日志文件保留的路径:
img_a6339ee3e57d1d52bc7d02b338e15a60.gif<appSettings>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    
<add key="logRoot" value="d:"/>
img_a6339ee3e57d1d52bc7d02b338e15a60.gif  
</appSettings>
找到日志文件,里面也赫然有着SoapMessage的真面目。通过以上方法,大家可以清晰地分析到SoapMessage的具体格式和内容,知道了这个以后,对付Web Service,您就可以随心应手,随心所欲,如果你愿意,你甚至也可以“强奸"一次webservice,哈哈!
上一篇文章地址:构建安全的Xml Web Service系列一之初探使用Soap头 (5-22 12:53)
附:终于买上房了,虽然买的过程很累,但现在还是很Happy!
http://www.jmfq.cn/news/5095711.html

相关文章:

  • 北京商城型网站建设/百度推广运营怎么做
  • 坂田网站建设流程/佛山百度提升优化
  • 有公网ip 如何做一网站/今日国际新闻最新消息
  • 做网站建设分哪些类型/推广引流的10个渠道
  • 企业微信app官网下载地址/seo网络推广优势
  • 网站设计要素 优帮云/模板建站的网站
  • wordpress网站如何迁移/品牌营销推广要怎么做
  • 曲阜网站设计/资源搜索引擎
  • 初期网站开发费会计分录/百度热线客服24小时
  • 丽江网站开发/常州网站建设制作
  • eclipse怎么做网页/百度搜索排名优化哪家好
  • 自助分红网站建设/友情链接收录
  • 网络运营者应当制定网络安全事件/抖音seo什么意思
  • 原创文章对网站的好处/北京seo优化哪家好
  • 湛江网站建设策划方案/网站seo工具
  • 无锡做网站公司哪家好/搜索引擎优化网站
  • 西红门做网站/营销推广案例
  • 傻瓜式做网站/优就业seo
  • 五金批发网站怎么做/最新消息新闻
  • 上海网站设计开发公司/官网seo优化找哪家做
  • icp ip 网站备案/培训心得简短
  • 专注河南网站建设/新网站推广方案
  • 石景山建网站/指数函数公式
  • 彩票做网站/杭州排名推广
  • 舆情分析报告格式/武汉seo计费管理
  • 我想找网站帮忙做宣传/b站在哪付费推广
  • 北京网站制作设计与开发服务/湖南网站建设效果
  • dedecms做门户网站/网络销售公司
  • 贵阳模板建站定制/免费发布外链
  • 导购网站建设需求模版/哪里有专业的培训机构