{"id":33448,"date":"2011-10-22T11:50:53","date_gmt":"2011-10-22T10:50:53","guid":{"rendered":"https:\/\/www.fuhaijun.com\/?p=33448"},"modified":"2011-10-22T11:50:53","modified_gmt":"2011-10-22T10:50:53","slug":"%e9%80%9a%e8%bf%87powershell%e6%89%a7%e8%a1%8csoap%e8%af%b7%e6%b1%82","status":"publish","type":"post","link":"https:\/\/www.fuhaijun.com\/?p=33448","title":{"rendered":"\u901a\u8fc7PowerShell\u6267\u884cSOAP\u8bf7\u6c42"},"content":{"rendered":"<p>&#160;&#160;&#160;&#160; SOAP\u7684\u8bf7\u6c42\u5728Web Service\u662f\u65e0\u5904\u4e0d\u5728\u7684\uff0c\u50cfWCF\u670d\u52a1\u548c\u4f20\u7edfASMX asp.net\u7684web Service\u3002\u5982\u679c\u8981\u6d4b\u8bd5SOAP\u670d\u52a1\u662f\u5426\u597d\u7528\u901a\u8fc7web\u7f16\u7a0b\u6765\u5b9e\u73b0\u5c31\u663e\u5f97\u592a\u8fc7\u4e8e\u590d\u6742\u4e86\uff0c\u4e0b\u9762\u7684\u811a\u672c\u7247\u6bb5(snippet)\u5c06\u4f1a\u8f7b\u800c\u6613\u4e3e\u7684\u5b8c\u6210\u901a\u8fc7powershell\u6d4b\u8bd5\u548c\u8c03\u7528SOAP\u670d\u52a1\uff1a<\/p>\n<div class=\"src_container\">\n<div class=\"titlebar\" title=\"\u6807\u9898\"><span class=\"toolbar\" title=\"\u5de5\u5177\u680f\u533a\u57df\"><span style=\"color: blue\" class=\"button\" onmouseover=\"ChangeIcon(this,true)\" title=\"\u663e\u793a\/\u9690\u85cf\u6e90\u4ee3\u7801\u884c\u53f7\" onmouseout=\"ChangeIcon(this,false)\" onclick=\"LineNumberVisible(this)\">\u9690\u85cf\u884c\u53f7<\/span> <span class=\"button\" onmouseover=\"ChangeIcon(this,true)\" title=\"\u5c06\u6e90\u4ee3\u7801\u590d\u5236\u5230\u526a\u8d34\u677f\u4e0a\" onkeypress=\"CopyCode_CheckKey(this,true)\" onmouseout=\"ChangeIcon(this,false)\" onclick=\"CopyCode(this)\">\u590d\u5236\u4ee3\u7801<\/span> <span class=\"button\" onmouseover=\"ChangeIcon(this,true)\" title=\"\u5173\u4e8e\u672c\u7a0b\u5e8f\" onmouseout=\"ChangeIcon(this,false)\" onclick=\"AboutMe()\">\uff1f<\/span> <\/span>\u8fd9\u662f\u4e00\u6bb5\u7a0b\u5e8f\u4ee3\u7801\u3002 <\/div>\n<div class=\"clientarea linewrap\" title=\"\u6e90\u4ee3\u7801\u533a\u57df\">\n<ol class=\"mainarea number_show\">\n<li value=\"value\">\n<pre class=\"alt\"><span style=\"color: blue\">function <\/span><span style=\"color: #5f9ea0\">Execute-SOAPRequest <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: #5f9ea0\"><\/span><span style=\"color: black\">( <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\">        [<\/span><span style=\"color: teal\">Xml<\/span><span style=\"color: black\">]    <\/span><span style=\"color: purple\">$SOAPRequest<\/span><span style=\"color: black\">, <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: black\">        [<\/span><span style=\"color: teal\">String<\/span><span style=\"color: black\">] <\/span><span style=\"color: purple\">$URL <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: purple\"><\/span><span style=\"color: black\">) <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: black\">{ <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\">        <\/span><span style=\"color: #5f9ea0\">write-host <\/span><span style=\"color: maroon\">&quot;Sending SOAP Request To Server: $URL&quot; <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">        <\/span><span style=\"color: purple\">$soapWebRequest <\/span><span style=\"color: red\">= <\/span><span style=\"color: black\">[<\/span><span style=\"color: teal\">System.Net.WebRequest<\/span><span style=\"color: black\">]::<\/span><span style=\"color: #8b4513\">Create<\/span><span style=\"color: black\">(<\/span><span style=\"color: purple\">$URL<\/span><span style=\"color: black\">) <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\">        <\/span><span style=\"color: purple\">$soapWebRequest<\/span><span style=\"color: black\">.Headers.Add(<\/span><span style=\"color: maroon\">&quot;SOAPAction&quot;<\/span><span style=\"color: black\">,<\/span><span style=\"color: maroon\">&quot;`&quot;http:\/\/www.facilities.co.za\/valid8service\/valid8service\/Valid8Address`&quot;&quot;<\/span><span style=\"color: black\">)<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: black\"><\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\">        <\/span><span style=\"color: purple\">$soapWebRequest<\/span><span style=\"color: black\">.ContentType <\/span><span style=\"color: red\">= <\/span><span style=\"color: maroon\">&quot;text\/xml;charset=`&quot;utf-8`&quot;&quot; <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">        <\/span><span style=\"color: purple\">$soapWebRequest<\/span><span style=\"color: black\">.Accept      <\/span><span style=\"color: red\">= <\/span><span style=\"color: maroon\">&quot;text\/xml&quot; <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">        <\/span><span style=\"color: purple\">$soapWebRequest<\/span><span style=\"color: black\">.Method      <\/span><span style=\"color: red\">= <\/span><span style=\"color: maroon\">&quot;POST&quot; <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">        <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">        <\/span><span style=\"color: #5f9ea0\">write-host <\/span><span style=\"color: maroon\">&quot;Initiating Send.&quot; <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">        <\/span><span style=\"color: purple\">$requestStream <\/span><span style=\"color: red\">= <\/span><span style=\"color: purple\">$soapWebRequest<\/span><span style=\"color: black\">.GetRequestStream() <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\">        <\/span><span style=\"color: purple\">$SOAPRequest<\/span><span style=\"color: black\">.Save(<\/span><span style=\"color: purple\">$requestStream<\/span><span style=\"color: black\">) <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: black\">        <\/span><span style=\"color: purple\">$requestStream<\/span><span style=\"color: black\">.Close() <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\">        <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: black\">        <\/span><span style=\"color: #5f9ea0\">write-host <\/span><span style=\"color: maroon\">&quot;Send Complete, Waiting For Response.&quot; <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">        <\/span><span style=\"color: purple\">$resp <\/span><span style=\"color: red\">= <\/span><span style=\"color: purple\">$soapWebRequest<\/span><span style=\"color: black\">.GetResponse() <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: black\">        <\/span><span style=\"color: purple\">$responseStream <\/span><span style=\"color: red\">= <\/span><span style=\"color: purple\">$resp<\/span><span style=\"color: black\">.GetResponseStream() <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\">        <\/span><span style=\"color: purple\">$soapReader <\/span><span style=\"color: red\">= <\/span><span style=\"color: black\">[<\/span><span style=\"color: teal\">System.IO.StreamReader<\/span><span style=\"color: black\">](<\/span><span style=\"color: purple\">$responseStream<\/span><span style=\"color: black\">) <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: black\">        <\/span><span style=\"color: purple\">$ReturnXml <\/span><span style=\"color: red\">= <\/span><span style=\"color: black\">[<\/span><span style=\"color: teal\">Xml<\/span><span style=\"color: black\">] <\/span><span style=\"color: purple\">$soapReader<\/span><span style=\"color: black\">.ReadToEnd() <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\">        <\/span><span style=\"color: purple\">$responseStream<\/span><span style=\"color: black\">.Close() <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: black\">        <\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\">        <\/span><span style=\"color: #5f9ea0\">write-host <\/span><span style=\"color: maroon\">&quot;Response Received.&quot;<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\"><\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">        <\/span><span style=\"color: blue\">return <\/span><span style=\"color: purple\">$ReturnXml <\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: purple\"><\/span><span style=\"color: black\">}<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: black\"><\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: black\"><\/span><span style=\"color: purple\">$url <\/span><span style=\"color: red\">= <\/span><span style=\"color: maroon\">'http:\/\/www.facilities.co.za\/valid8service\/valid8service.asmx'<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\"><\/span><span style=\"color: purple\">$soap <\/span><span style=\"color: red\">= <\/span><span style=\"color: black\">[<\/span><span style=\"color: teal\">xml<\/span><span style=\"color: black\">]<\/span><span style=\"color: maroon\">@'<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">&lt;soap12:Envelope xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xmlns:xsd=&quot;http:\/\/www.w3.org\/2001\/XMLSchema&quot; xmlns:soap12=&quot;http:\/\/www.w3.org\/2003\/05\/soap-envelope&quot;&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">  &lt;soap12:Body&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">    &lt;Valid8Address xmlns=&quot;http:\/\/www.facilities.co.za\/valid8service\/valid8service&quot;&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">      &lt;ID&gt;string&lt;\/ID&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">      &lt;Address1&gt;&lt;\/Address1&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">      &lt;Address2&gt;&lt;\/Address2&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">      &lt;Address3&gt;&lt;\/Address3&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">      &lt;Address4&gt;&lt;\/Address4&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">      &lt;Address5&gt;&lt;\/Address5&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">      &lt;Address6&gt;&lt;\/Address6&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">      &lt;PostCode&gt;&lt;\/PostCode&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">    &lt;\/Valid8Address&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">  &lt;\/soap12:Body&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\">&lt;\/soap12:Envelope&gt;<\/span><\/pre>\n<\/li>\n<li>\n<pre class=\"alt\"><span style=\"color: maroon\">'@<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: maroon\"><\/span><span style=\"color: purple\">$ret <\/span><span style=\"color: red\">= <\/span><span style=\"color: #5f9ea0\">Execute-SOAPRequest <\/span><span style=\"color: purple\">$soap $url<\/span><\/pre>\n<\/li>\n<\/ol><\/div>\n<\/div>\n<style type=\"text\/css\">\n<p>.src_container{background-color:#e7e5dc; width:99%; overflow:hidden; margin:12px 0 12px 0 !important; padding:0px 3px 3px 0px}\n.src_container .titlebar{ background-color:#d4dfff;  border:1px solid #4f81bd;  border-bottom:0;  padding:3px 24px;  margin:0;  width:auto;  line-height:120%;  overflow:hidden;  text-align:left;  font-size:12px}\n.src_container .toolbar{ display:inline;  font-weight:normal;  font-size:100%;  float:right;  cursor:hand;  color:#00f;  text-align:left;  overflow:hidden}\n.toolbar span.button{ display:inline;  font-weight:normal;  font-size:100%;  cursor:hand;  color:#00f;  text-align:left;  overflow:hidden;  cursor:pointer;}\n.src_container div.clientarea{ background-color:white;  border:1px solid #4f81bd;  margin:0;  width:auto !important;  width:100%;  height:auto;  overflow:auto;  text-align:left;  font-size:12px;  font-family: \"Courier New\",\"Consolas\",\"Fixedsys\",courier,monospace,serif}\n.src_container ol.mainarea{ padding:0 0 0 52px;  margin:0;  background-color:#f7f7ff !important}\n.number_show{ padding-left:52px !important;  list-style:decimal outside !important}\n.number_show li{ list-style:decimal outside !important;  border-left:1px dotted #4f81bd}\n.number_hide{ padding-left:0px !important;  list-style-type:none !important}\n.number_hide li{ list-style-type:none !important;  border-left:0px}\nol.mainarea li{ display:list-item !important;  font-size:12px !important;  margin:0 !important;  line-height:18px !important;  padding:0 0 0 0px !important;  background-color:#f7f7ff !important;  color:#4f81bd}\nol.mainarea li pre{color:black; line-height:18px;  padding:0 0 0 12px !important; margin:0em;  background-color:#fff !important}\n.linewrap ol.mainarea li pre{white-space:pre-wrap; white-space:-moz-pre-wrapwhite-space:-pre-wrap; white-space:-o-pre-wrap; word-wrap:break-word}\nol.mainarea li pre.alt{ background-color:#f7f7ff !important}<\/style>\n<p><script language=\"javascript\">\nfunction CopyCode(key){var codeElement=null;var trElements=document.all.tags(\"ol\");var i;for(i=0;i<trelements .length;++i){if(key.parentElement.parentElement.parentElement==trElements[i].parentElement.parentElement){codeElement=trElements[i];break}}if(codeElement!=null){var content=codeElement.innerText;if(window.clipboardData==null){window.alert(\"\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u811a\u672c\u590d\u5236\uff0c\u8bf7\u5c1d\u8bd5\u624b\u52a8\u590d\u5236\u3002\")}else{window.clipboardData.setData(\"Text\",content);window.alert(\"\u6e90\u4ee3\u7801\u5df2\u7ecf\u590d\u5236\u5230\u526a\u8d34\u677f\u4e0a\u3002\")}}}function LineNumberVisible(key){var codeElement=null;var trElements=document.all.tags(\"ol\");var i;for(i=0;i<trElements.length;++i){if(key.parentElement.parentElement.parentElement==trElements[i].parentElement.parentElement){codeElement=trElements[i];break}}if(codeElement!=null){if(codeElement.className==\"mainarea number_hide\"){codeElement.className=\"mainarea number_show\";key.innerText=\"\u9690\u85cf\u884c\u53f7\"}else{codeElement.className=\"mainarea number_hide\";key.innerText=\"\u663e\u793a\u884c\u53f7\"}}}function ChangeIcon(key,isHover){if(isHover)key.style.color='red';else key.style.color='blue'}function CopyCode_CheckKey(key){if(window.event.keyCode==13)CopyCode(key)}function AboutMe(){window.alert(\"\u672c\u4ee3\u7801\u6846\u7531 CodePaste for Windows Live Writer \u751f\u6210\u3002\\r\\n\\r\\nAuthor: \u8303\u4f20\u6839\\r\\nEmail: chuangen@live.cn\\r\\nWebsite: http:\/\/chuangen.name\\r\\nBlog: http:\/\/blog.csdn.net\/chuangen\");}\n<\/script>&#160;&#160;&#160;&#160;&#160; \u5728\u8fd9\u91cc\u5f97\u5230\u7684$ret\u53d8\u91cf\u4e2d\u5b58\u50a8\u7684\u662fSystem.Xml.XmlDocument\u5bf9\u8c61\uff0c\u5982\u679c\u9700\u8981\u67e5\u770b\u5176\u4e2d\u7684\u5177\u4f53\u5185\u5bb9\u53ef\u4ee5\u901a\u8fc7Export-Clixml\u8fd9\u4e2acmdlet\u5c06\u5176\u8f93\u51fa\u5230\u672c\u5730\u6587\u4ef6\u4e2d\u67e5\u770b\u3002 <\/p>\n<div class=\"src_container\">\n<div class=\"titlebar\" title=\"\u6807\u9898\"><span class=\"toolbar\" title=\"\u5de5\u5177\u680f\u533a\u57df\"><span class=\"button\" onmouseover=\"ChangeIcon(this,true)\" title=\"\u663e\u793a\/\u9690\u85cf\u6e90\u4ee3\u7801\u884c\u53f7\" onmouseout=\"ChangeIcon(this,false)\" onclick=\"LineNumberVisible(this)\">\u9690\u85cf\u884c\u53f7<\/span> <span class=\"button\" onmouseover=\"ChangeIcon(this,true)\" title=\"\u5c06\u6e90\u4ee3\u7801\u590d\u5236\u5230\u526a\u8d34\u677f\u4e0a\" onkeypress=\"CopyCode_CheckKey(this,true)\" onmouseout=\"ChangeIcon(this,false)\" onclick=\"CopyCode(this)\">\u590d\u5236\u4ee3\u7801<\/span> <span class=\"button\" onmouseover=\"ChangeIcon(this,true)\" title=\"\u5173\u4e8e\u672c\u7a0b\u5e8f\" onmouseout=\"ChangeIcon(this,false)\" onclick=\"AboutMe()\">\uff1f<\/span> <\/span>\u8fd9\u662f\u4e00\u6bb5\u7a0b\u5e8f\u4ee3\u7801\u3002 <\/div>\n<div class=\"clientarea linewrap\" title=\"\u6e90\u4ee3\u7801\u533a\u57df\">\n<ol class=\"mainarea number_show\">\n<li value=\"value\">\n<pre class=\"alt\"><span style=\"color: purple\">$ret <\/span><span style=\"color: black\">| <\/span><span style=\"color: #5f9ea0\">Export-Clixml  <\/span><span style=\"color: maroon\">c:\\1.xml;Get-Content c:\\1.xml<\/span><\/pre>\n<\/li>\n<\/ol><\/div>\n<\/div>\n<style type=\"text\/css\">\n<p>.src_container{background-color:#e7e5dc; width:99%; overflow:hidden; margin:12px 0 12px 0 !important; padding:0px 3px 3px 0px}\n.src_container .titlebar{ background-color:#d4dfff;  border:1px solid #4f81bd;  border-bottom:0;  padding:3px 24px;  margin:0;  width:auto;  line-height:120%;  overflow:hidden;  text-align:left;  font-size:12px}\n.src_container .toolbar{ display:inline;  font-weight:normal;  font-size:100%;  float:right;  cursor:hand;  color:#00f;  text-align:left;  overflow:hidden}\n.toolbar span.button{ display:inline;  font-weight:normal;  font-size:100%;  cursor:hand;  color:#00f;  text-align:left;  overflow:hidden;  cursor:pointer;}\n.src_container div.clientarea{ background-color:white;  border:1px solid #4f81bd;  margin:0;  width:auto !important;  width:100%;  height:auto;  overflow:auto;  text-align:left;  font-size:12px;  font-family: \"Courier New\",\"Consolas\",\"Fixedsys\",courier,monospace,serif}\n.src_container ol.mainarea{ padding:0 0 0 52px;  margin:0;  background-color:#f7f7ff !important}\n.number_show{ padding-left:52px !important;  list-style:decimal outside !important}\n.number_show li{ list-style:decimal outside !important;  border-left:1px dotted #4f81bd}\n.number_hide{ padding-left:0px !important;  list-style-type:none !important}\n.number_hide li{ list-style-type:none !important;  border-left:0px}\nol.mainarea li{ display:list-item !important;  font-size:12px !important;  margin:0 !important;  line-height:18px !important;  padding:0 0 0 0px !important;  background-color:#f7f7ff !important;  color:#4f81bd}\nol.mainarea li pre{color:black; line-height:18px;  padding:0 0 0 12px !important; margin:0em;  background-color:#fff !important}\n.linewrap ol.mainarea li pre{white-space:pre-wrap; white-space:-moz-pre-wrapwhite-space:-pre-wrap; white-space:-o-pre-wrap; word-wrap:break-word}\nol.mainarea li pre.alt{ background-color:#f7f7ff !important}<\/style>\n<p><script language=\"javascript\">\nfunction CopyCode(key){var codeElement=null;var trElements=document.all.tags(\"ol\");var i;for(i=0;i<trelements .length;++i){if(key.parentElement.parentElement.parentElement==trElements[i].parentElement.parentElement){codeElement=trElements[i];break}}if(codeElement!=null){var content=codeElement.innerText;if(window.clipboardData==null){window.alert(\"\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u811a\u672c\u590d\u5236\uff0c\u8bf7\u5c1d\u8bd5\u624b\u52a8\u590d\u5236\u3002\")}else{window.clipboardData.setData(\"Text\",content);window.alert(\"\u6e90\u4ee3\u7801\u5df2\u7ecf\u590d\u5236\u5230\u526a\u8d34\u677f\u4e0a\u3002\")}}}function LineNumberVisible(key){var codeElement=null;var trElements=document.all.tags(\"ol\");var i;for(i=0;i<trElements.length;++i){if(key.parentElement.parentElement.parentElement==trElements[i].parentElement.parentElement){codeElement=trElements[i];break}}if(codeElement!=null){if(codeElement.className==\"mainarea number_hide\"){codeElement.className=\"mainarea number_show\";key.innerText=\"\u9690\u85cf\u884c\u53f7\"}else{codeElement.className=\"mainarea number_hide\";key.innerText=\"\u663e\u793a\u884c\u53f7\"}}}function ChangeIcon(key,isHover){if(isHover)key.style.color='red';else key.style.color='blue'}function CopyCode_CheckKey(key){if(window.event.keyCode==13)CopyCode(key)}function AboutMe(){window.alert(\"\u672c\u4ee3\u7801\u6846\u7531 CodePaste for Windows Live Writer \u751f\u6210\u3002\\r\\n\\r\\nAuthor: \u8303\u4f20\u6839\\r\\nEmail: chuangen@live.cn\\r\\nWebsite: http:\/\/chuangen.name\\r\\nBlog: http:\/\/blog.csdn.net\/chuangen\");}\n<\/script><\/p>\n<p>\u4f5c\u8005: \u4ed8\u6d77\u519b<br \/>\n  <br \/>\u7248\u6743\uff1a\u672c\u6587\u7248\u6743\u5f52\u4f5c\u8005\u6240\u6709<\/p>\n<p>\u8f6c\u8f7d\uff1a\u6b22\u8fce\u8f6c\u8f7d\uff0c\u4e3a\u4e86\u4fdd\u5b58\u4f5c\u8005\u7684\u521b\u4f5c\u70ed\u60c5\uff0c\u8bf7\u6309\u8981\u6c42\u3010\u8f6c\u8f7d\u3011\uff0c\u8c22\u8c22<\/p>\n<p>\u8981\u6c42\uff1a\u672a\u7ecf\u4f5c\u8005\u540c\u610f\uff0c\u5fc5\u987b\u4fdd\u7559\u6b64\u6bb5\u58f0\u660e\uff1b\u5fc5\u987b\u5728\u6587\u7ae0\u4e2d\u7ed9\u51fa\u539f\u6587\u8fde\u63a5\uff1b\u5426\u5219\u5fc5\u7a76\u6cd5\u5f8b\u8d23\u4efb <\/p>\n<p>\u4e2a\u4eba\u7f51\u7ad9: <a href=\"http:\/\/shell.tor.hu\/\">http:\/\/shell.tor.hu\/<\/a><\/p>\n<\/trelements><\/script><\/trelements><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#160;&#160;&#160;&#160; SOAP\u7684\u8bf7\u6c42\u5728Web Service\u662f\u65e0\u5904\u4e0d\u5728\u7684\uff0c\u50cfWCF [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[43,57],"class_list":["post-33448","post","type-post","status-publish","format-standard","hentry","category-powershell","tag-powershell","tag-soap"],"_links":{"self":[{"href":"https:\/\/www.fuhaijun.com\/index.php?rest_route=\/wp\/v2\/posts\/33448"}],"collection":[{"href":"https:\/\/www.fuhaijun.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fuhaijun.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fuhaijun.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fuhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33448"}],"version-history":[{"count":0,"href":"https:\/\/www.fuhaijun.com\/index.php?rest_route=\/wp\/v2\/posts\/33448\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.fuhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fuhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fuhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}