从c#添加Web引用

时间:2014-01-28 11:16:42

标签: c# java .net web-reference

我正在尝试从c#客户端访问网络服务器。我在C#客户端添加了webreference。 当我调用API时,我得到以下异常

"SOAPException was unhanded"
java.lang.NoSuchMethodException: com.dotv.server.api.soap.DimService.setUser(java.lang.String)

这里有什么线索错了吗?

代码:

     WebReference.SLVDimmingServiceService service;
     service = new WebReference.SLVDimmingServiceService();
     service.Credentials = new System.Net.NetworkCredential("admin", "password");
     service.setDimmingLevel("SC", "olc_7050_2.OLC[0]", (float)100.00);

例外:



System.Web.Services.Protocols.SoapException:java.lang.NoSuchMethodException:com.dotv.streetlightserver.api.soap.SLVDimmingService.setUser(java.lang.String)

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message,WebResponse response,Stream responseStream,Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,Object [] parameters)

位于C:\ Users \ 310103448 \ Documents \ Visual Studio 2010 \ Projects \ testproject \ WindowsFormsApplication4 \ Web References \ WebReference \ Reference.cs中的WindowsFormsApplication4.WebReference.SLVDimmingServiceService.setDimmingLevel(String controllerStrId,String idOnController,Single dimmingLevel):第254行

位于C:\ Users \ 310103448 \ Documents \ Visual Studio 2010 \ Projects \ testproject \ WindowsFormsApplication4 \ Form1.cs:第42行

中的WindowsFormsApplication4.Form1.button1_Click(Object sender,EventArgs e)

确定

0 个答案:

没有答案