I have a class generated of a WSDL file.
Now i am trying to use the class, but getting error
"System.NullReferenceException was unhandled"
How mus a declare the type out of the WSDL ?
Here some code, but i have also a "Hello World" code for download :
http://xs4all.nl/~ramse/BSNTest.zip
Any help will be very helpful
groetjes Rene.
private void Test_Click(object sender, EventArgs e)
{
BSN_WSDL.CIBG_SBV_Interface_XIS_InterfaceXIS_XISIn terface_Port
WSDLFunction = new
BSN_WSDL.CIBG_SBV_Interface_XIS_InterfaceXIS_XISIn terface_Port();
BSN_WSDL.XISAntwoordType ReturnData = new
BSN_WSDL.XISAntwoordType();
BSN_WSDL.XISVraagType SendData = new BSN_WSDL.XISVraagType();
X509Store store = new X509Store(StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly);
X509CertificateCollection col;
col =
store.Certificates.Find(X509FindType.FindBySerialN umber,
"43dc98c57a8428f38798dd97a812e10e", false);
if (col.Count >= 1)
{
WSDLFunction.ClientCertificates.Add(col[0]);
}
// here comes the error System.NullReferenceException was
unhandled
SendData.Vraag.Persoon.BSN = "123456789";
ReturnData = WSDLFunction.GetBSNInfo(SendData);
MessageBox.Show(ReturnData.Antwoord.Adres.FunctieA dres);
}