问大家另外一个问题 :)我在网上找到一个webservice, http://www.tcbbank.com.tw/services/TcbTwWeatherWs.asmx 大家试试呢?? 报错如下: "Server was unable to process request. --> Object reference not set to an instance of an object."
问大家另外一个问题 :)我在网上找到一个webservice, http://www.tcbbank.com.tw/services/TcbTwWeatherWs.asmx 大家试试呢??...... ---------The test form is only available for requests from the local machine. 只能在本机测试
To; helloworld84(梦的存在,是为了追求!)The test form is only available for requests from the local machine. 只能在本机测试 --------------------------- 这个的原因应该是服务器的WEB.CONFIG文件没有加 <webServices> <protocols> <add name="HttpGet" /> <add name="HttpPost" /> <add name="HttpPostLocalhost" /> <add name="Documentation" /> </protocols> </webServices> 这和能否在客户端进行调用有什么关系呢?? 麻烦大哥解释一下,先谢谢啦~~~~~!
不知道这个能不能帮上忙
这样我访问http://api.google.com/GoogleSearch.wsdl时vs.net的生成的代理类的代码:
加入如下代码就OK了~~!~哈 [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="GlobalWeatherSoap", Namespace="http://www.webserviceX.NET")]
public class GlobalWeather : System.Web.Services.Protocols.SoapHttpClientProtocol {
/// <res/>
public GlobalWeather() {
this.Url = "http://www.webservicex.net/globalweather.asmx";
//-----------指定代理服务器--(这里既是新增代码)-----------------
System.Net.WebProxy myProxy
=new System.Net.WebProxy("192.*.*.*",8080); //“192.*.*.*“为代理服务器的IP地址
this.Proxy=myProxy;
//-------------------------------------------------------------------------
}
http://www.tcbbank.com.tw/services/TcbTwWeatherWs.asmx
大家试试呢??
报错如下:
"Server was unable to process request. --> Object reference not set to an instance of an object."
我的代码如下:
tcbbank.TcbTwWeatherService test=new tcbbank.TcbTwWeatherService();
try
{
Label1.Text=test.GetTwAreaWeather(tcbbank.SelAreaType.台北市,tcbbank.SelTimeType.明天白天).ToString();
}
catch(Exception ex)
{
Response.Write(ex.Message);
}拜托啦,呵呵~
http://www.tcbbank.com.tw/services/TcbTwWeatherWs.asmx
大家试试呢??......
---------The test form is only available for requests from the local machine.
只能在本机测试
只能在本机测试
---------------------------
这个的原因应该是服务器的WEB.CONFIG文件没有加
<webServices>
<protocols>
<add name="HttpGet" />
<add name="HttpPost" />
<add name="HttpPostLocalhost" />
<add name="Documentation" />
</protocols>
</webServices>
这和能否在客户端进行调用有什么关系呢??
麻烦大哥解释一下,先谢谢啦~~~~~!
[email protected] , 谢谢!!
<webServices>
<protocols>
.........
----------那个我也不清楚,对于WebServer我也不熟悉,只是它那句话表示的就是这个问题,跟你一起等答案了
已经发过去啦,呵呵~!
帮我解答一下问题呢:)