0

これは、私が投稿したAndroid アクセス ソープ サービスに関する質問のフォロー アップです。多くのデバッグとwiresharkを使用した後、これが送信されていることに気付きました。

 POST /GetGoldPrice.asmx HTTP/1.1 
user-agent: kSOAP/2.0 
soapaction: http://freewebservicesx.com/GetCurrentGoldPrice 
content-type: text/xml 
connection: close 
content-length: 475 
Host: www.freewebservicesx.com 

<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header /><v:Body>
<GetCurrentGoldPrice xmlns="http://www.freewebservicesx.com/" id="o0" c:root="1">
<UserName i:type="d:string">username</UserName>
<Password i:type="d:string">111</Password></GetCurrentGoldPrice></v:Body></v:Envelope> 
HTTP/1.1 500 Internal Server Error 
Connection: close 
Date: Mon, 09 Apr 2012 04:38:50 GMT 
Server: Microsoft-IIS/6.0 
X-Powered-By: ASP.NET 
X-AspNet-Version: 2.0.50727 
Cache-Control: private 
Content-Type: text/xml; charset=utf-8 
Content-Length: 753 

エラー応答

<?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><soap:Fault><faultcode>soap:Server</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&gt; System.ArgumentNullException: Value cannot be null. 
Parameter name: password 
   at System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(String password, String passwordFormat) 
   at GetGoldPrice.GetCurrentGoldPrice(String UserName, String Password) 
   --- End of inner exception stack trace ---</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>

サイトが何を期待しているかの詳細。

http://www.freewebservicesx.com/GetGoldPrice.asmx?op=GetCurrentGoldPrice

4

2 に答える 2

0
<webServices>
  <protocols>
    <add name="HttpGet"/>
    <add name="HttpPost"/>
  </protocols>
</webServices>

これをタグweb.configのファイルに追加しますsystem.web

于 2012-11-28T12:05:15.887 に答える