Hello,
I am a little bit distressed. I have generated a WebService to handle my database access from a desktop and mobile device application. Everything works fine. But for now I get a "NullReference" exception, but only on my mobile device:
System.NullReferenceException wurde nicht behandelt.
Message="NullReferenceException"
StackTrace:
bei SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2.Xml2Entity()
bei SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2.ReadXml()
bei SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2.ReadXml()
bei System.Xml.Serialization.XmlSerializationReader.DeserializeSerializableElement()
bei System.Xml.Serialization.XmlSerializationReader.deserializeElement()
bei System.Xml.Serialization.XmlSerializationReader.DeserializeElementMember()
bei System.Xml.Serialization.XmlSerializationReader.deserializeMembers()
bei System.Xml.Serialization.XmlSerializationReader.DeserializeComplexElement()
bei System.Xml.Serialization.XmlSerializationReader.deserializeElement()
bei System.Xml.Serialization.XmlSerializationReader.DeserializeElementMember()
bei System.Xml.Serialization.XmlSerializationReader.deserializeMembers()
bei System.Web.Services.Protocols.SoapMessageParser.execute()
bei System.Web.Services.Protocols.SoapMessageSerializer.Deserialize()
bei System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke()
bei System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke()
bei MobileOffice.Web.Service.GetCurrentMandator()
bei MobileOffice.BL.Generic.get_Mandant()
bei MobileOffice.UI.Leistungserfassung.Zusatzleistung.InitEntity()
bei MobileOffice.UI.Leistungserfassung.Zusatzleistung.cboLeistung_KeyPress()
here is the generated and (modified
) code from the reference.cs:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetCurrentMandator", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public MandantenstammEntity GetCurrentMandator() {
object[] results = this.Invoke("GetCurrentMandator", new object[0]);
return ((MandantenstammEntity)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetCurrentMandator(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetCurrentMandator", new object[0], callback, asyncState);
}
/// <remarks/>
public MandantenstammEntity EndGetCurrentMandator(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((MandantenstammEntity)(results[0]));
}
Last week it was still working
Regards,
Carlo