我有一个制表符控件。第一个选项卡有一个网格,其中一列是一个复选框。用户选择它并单击选项卡下的“下一步”,然后转到下一选项卡。
我正在使用web引用来获取这些值。当页面第一次加载时,引用可以工作,并且可以达到值,网格将被绑定。
但是当我点击“下一步”时,回发发生了,它试图再次绑定网格,然后引用给出"SoapExpection“。以下是详细信息:
->我选择一行,然后单击“下一步”:
protected void gridView_HtmlRowCreated(object sender, ASPxGridViewTableRowEventArgs e)
{
if (e.RowType == GridViewRowType.Data)
{
//bla bla bla
//I get the error here:
ClassEntity tmpObjects = webService.callObjects(rowID);
//bla bla bla
{
{->和名为callObjects(int ID)的函数(在Reference.cs中)
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("...", RequestNamespace="...", ResponseNamespace="...", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ClassEntity callObjects(int ID) {
object[] results = this.Invoke("callObjects", new object[] {
ID});
return ((ClassEntity)(results[0]));和确切的错误:"SoapException:服务器无法处理请求。对象引用未设置为对象的实例“。
任何想法,建议或者..。解决方案?提前谢谢。
发布于 2011-07-13 22:39:13
我在一个继承自System.Web.Services.Protocols.SoapHeader的类中使用用户名和密码访问web引用。
所以我在gridView_HtmlRowCreated事件下做了同样的解密,它起作用了。
希望这对像我这样的人有帮助。
https://stackoverflow.com/questions/6674827
复制相似问题