method can not be reflected
Jeg har en webservice med en masse webmethods i...Efter at have tilføjet en ny webmethod, DeleteDocumentByUrl får jeg følgende fejl, når jeg kalder en metode fra clienten(ikke kun den nye metode):
InvalidOperationException ocurred in system.web.services.dll
Method DeleteDocumentByUrl can not be reflected.
Jeg har genereret proxy klasser til både client og server vha. wsdl.exe i Visual studio, på baggrund af en wsdl.
lidt kode:
client proxy:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://isb.oio.dk/oioservice/service/public/2/DeleteDocumentByUrl", RequestElementName="DeleteDocumentByUrlParam",
RequestNamespace="http://isb.oio.dk/oioservice/service/public/2/",
ResponseElementName="BooleanReturn",
ResponseNamespace="http://isb.oio.dk/oioservice/service/public/2/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("Boolean")]
public bool DeleteDocumentByUrl(int ReviewRequestID, string DocumentUrl) {
object[] results = this.Invoke("DeleteDocumentByUrl", new object[] {
ReviewRequestID,
DocumentUrl});
return ((bool)(results[0]));
}
server proxy klasse:
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://isb.oio.dk/oioservice/service/public/2/DeleteDocumentByUrl", RequestElementName="DeleteDocumentByUrlParam",
RequestNamespace="http://isb.oio.dk/oioservice/service/public/2/",
ResponseElementName="BooleanReturn",
ResponseNamespace="http://isb.oio.dk/oioservice/service/public/2/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("Boolean")]
public abstract bool DeleteDocumentByUrl(int ReviewRequestID, string DocumentUrl);
server implementering:
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://isb.oio.dk/oioservice/service/public/2/DeleteDocumentByUrl",
RequestNamespace="http://isb.oio.dk/oioservice/service/public/2/",
ResponseElementName="BooleanReturn",
ResponseNamespace="http://isb.oio.dk/oioservice/service/public/2/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("Boolean")]
public override bool DeleteDocumentByUrl(int ReviewRequestID, string DocumentUrl)
{
//do something
}
det ser lidt uoverskueligt ud med alle de attributter men det må være her et sted fejlen ligger...
Nogen der kan hjælpe, evt. bare med lidt generel info om reflection og hvilke typer fejl det kan give.
Så vidt jeg har forstået er reflection noget med at bestemme typer o.lign "on the fly" eller runtime???
