I have a class generated of a WSDL file.
Now i am trying to use the class, but getting error
"System.NullRef erenceException 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 :
Any help will be very helpful
groetjes Rene.
private void Test_Click(obje ct sender, EventArgs e)
{
BSN_WSDL.CIBG_S BV_Interface_XI S_InterfaceXIS_ XISInterface_Po rt
WSDLFunction = new
BSN_WSDL.CIBG_S BV_Interface_XI S_InterfaceXIS_ XISInterface_Po rt();
BSN_WSDL.XISAnt woordType ReturnData = new
BSN_WSDL.XISAnt woordType();
BSN_WSDL.XISVra agType SendData = new BSN_WSDL.XISVra agType();
X509Store store = new X509Store(Store Location.Curren tUser);
store.Open(Open Flags.ReadOnly) ;
X509Certificate Collection col;
col =
store.Certifica tes.Find(X509Fi ndType.FindBySe rialNumber,
"43dc98c57a8428 f38798dd97a812e 10e", false);
if (col.Count >= 1)
{
WSDLFunction.Cl ientCertificate s.Add(col[0]);
}
// here comes the error System.NullRefe renceException was
unhandled
SendData.Vraag. Persoon.BSN = "123456789" ;
ReturnData = WSDLFunction.Ge tBSNInfo(SendDa ta);
MessageBox.Show (ReturnData.Ant woord.Adres.Fun ctieAdres);
}
Now i am trying to use the class, but getting error
"System.NullRef erenceException 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 :
Any help will be very helpful
groetjes Rene.
private void Test_Click(obje ct sender, EventArgs e)
{
BSN_WSDL.CIBG_S BV_Interface_XI S_InterfaceXIS_ XISInterface_Po rt
WSDLFunction = new
BSN_WSDL.CIBG_S BV_Interface_XI S_InterfaceXIS_ XISInterface_Po rt();
BSN_WSDL.XISAnt woordType ReturnData = new
BSN_WSDL.XISAnt woordType();
BSN_WSDL.XISVra agType SendData = new BSN_WSDL.XISVra agType();
X509Store store = new X509Store(Store Location.Curren tUser);
store.Open(Open Flags.ReadOnly) ;
X509Certificate Collection col;
col =
store.Certifica tes.Find(X509Fi ndType.FindBySe rialNumber,
"43dc98c57a8428 f38798dd97a812e 10e", false);
if (col.Count >= 1)
{
WSDLFunction.Cl ientCertificate s.Add(col[0]);
}
// here comes the error System.NullRefe renceException was
unhandled
SendData.Vraag. Persoon.BSN = "123456789" ;
ReturnData = WSDLFunction.Ge tBSNInfo(SendDa ta);
MessageBox.Show (ReturnData.Ant woord.Adres.Fun ctieAdres);
}