| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I have trouble to execute the UitDeCOVClass.controleer in my "hello world" project. The problem is that i dont understand how the wsdl class must be reached and the right value must be filed. Groetjes Rene Here is the code ..... ************************************ ..... using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; ..... void Button1Click(object sender, EventArgs e) { /* The wsdl file is at : https://acccertificaten.vecozo.nl/we...ov/vz3738.asmx */ X509Store store = new X509Store(StoreLocation.CurrentUser); store.Open(OpenFlags.ReadOnly); X509CertificateCollection col = store.Certificates.Find(X509FindType.FindByIssuerN ame, "VEcCOZO",false); vecozo.vz3738 UitDeCOVClass; UitDeCOVClass = new vecozo.vz3738(); // check certificate if found if (col.Count == 1) { UitDeCOVClass.ClientCertificates.Add(store.Certifi cates[0]); } else MessageBox.Show("No certificate found what match."); /* from here i lost it.. I cant get the UitDeCOVClass.controleer(......) to work */ vecozo.AanvraagCovType ThePatient; ThePatient = new vecozo.AanvraagCovType(); vecozo.RetourinfoCovType TheReturn; TheReturn = new vecozo.RetourinfoCovType(); vecozo.ControleerInput Patients; Patients = new vecozo.ControleerInput(); ThePatient.Achternaam = "Do"; //John Do ThePatient.Geslacht = 1; ThePatient.GeboorteDatum=DateTime.Parse("26-08-2008"); ThePatient.PeildatumVerzekering = DateTime.Parse("26-08-2008"); UitDeCOVClass.controleer(Patients); // finaly check if we have got something from vecozo MessageBox.Show(Convert.ToString(TheReturn.BSN)); } |
|
#2
| |||
| |||
| Rene A wrote: > Hi, > > > I have trouble to execute the UitDeCOVClass.controleer > in my "hello world" project. The problem is that i dont understand how > the wsdl class must be reached and the right value must be filed. > > Groetjes Rene > > > > Here is the code ..... > ************************************ > > .... > using System.Security.Cryptography; > using System.Security.Cryptography.X509Certificates; > .... > > > void Button1Click(object sender, EventArgs e) > { > /* > > The wsdl file is at : > https://acccertificaten.vecozo.nl/we...ov/vz3738.asmx > > */ > X509Store store = new X509Store(StoreLocation.CurrentUser); > store.Open(OpenFlags.ReadOnly); > X509CertificateCollection col = > store.Certificates.Find(X509FindType.FindByIssuerN ame, "VEcCOZO",false); > > vecozo.vz3738 UitDeCOVClass; > UitDeCOVClass = new vecozo.vz3738(); > > // check certificate if found > if (col.Count == 1) > { > UitDeCOVClass.ClientCertificates.Add(store.Certifi cates[0]); > } else MessageBox.Show("No certificate found what match."); > > /* > from here i lost it.. > I cant get the UitDeCOVClass.controleer(......) to work > */ > > vecozo.AanvraagCovType ThePatient; > ThePatient = new vecozo.AanvraagCovType(); > > vecozo.RetourinfoCovType TheReturn; > TheReturn = new vecozo.RetourinfoCovType(); > > vecozo.ControleerInput Patients; > Patients = new vecozo.ControleerInput(); > > ThePatient.Achternaam = "Do"; //John Do That's "John Doe". ![]() > ThePatient.Geslacht = 1; > ThePatient.GeboorteDatum=DateTime.Parse("26-08-2008"); > ThePatient.PeildatumVerzekering = DateTime.Parse("26-08-2008"); > > UitDeCOVClass.controleer(Patients); > > // finaly check if we have got something from vecozo > MessageBox.Show(Convert.ToString(TheReturn.BSN)); > } You are putting data in the ThePatient object, and expecting a result in the TheReturn object, but neither is involved in the call to the web service. -- Göran Andersson _____ http://www.guffa.com |
|
#3
| |||
| |||
| Göran Andersson schreef: > Rene A wrote: >> Hi, >> >> >> I have trouble to execute the UitDeCOVClass.controleer >> in my "hello world" project. The problem is that i dont understand how >> the wsdl class must be reached and the right value must be filed. >> >> Groetjes Rene >> >> >> >> Here is the code ..... >> ************************************ >> >> .... >> using System.Security.Cryptography; >> using System.Security.Cryptography.X509Certificates; >> .... >> >> >> void Button1Click(object sender, EventArgs e) >> { >> /* >> >> The wsdl file is at : >> https://acccertificaten.vecozo.nl/we...ov/vz3738.asmx >> >> */ >> X509Store store = new X509Store(StoreLocation.CurrentUser); >> store.Open(OpenFlags.ReadOnly); >> X509CertificateCollection col = >> store.Certificates.Find(X509FindType.FindByIssuerN ame, "VEcCOZO",false); >> >> vecozo.vz3738 UitDeCOVClass; >> UitDeCOVClass = new vecozo.vz3738(); >> >> // check certificate if found >> if (col.Count == 1) >> { >> UitDeCOVClass.ClientCertificates.Add(store.Certifi cates[0]); >> } else MessageBox.Show("No certificate found what match."); >> >> /* >> from here i lost it.. >> I cant get the UitDeCOVClass.controleer(......) to work >> */ >> >> vecozo.AanvraagCovType ThePatient; >> ThePatient = new vecozo.AanvraagCovType(); >> >> vecozo.RetourinfoCovType TheReturn; >> TheReturn = new vecozo.RetourinfoCovType(); >> >> vecozo.ControleerInput Patients; >> Patients = new vecozo.ControleerInput(); >> >> ThePatient.Achternaam = "Do"; //John Do > > That's "John Doe". ![]() > >> ThePatient.Geslacht = 1; >> ThePatient.GeboorteDatum=DateTime.Parse("26-08-2008"); >> ThePatient.PeildatumVerzekering = DateTime.Parse("26-08-2008"); >> >> UitDeCOVClass.controleer(Patients); >> >> // finaly check if we have got something from vecozo >> MessageBox.Show(Convert.ToString(TheReturn.BSN)); >> } > > You are putting data in the ThePatient object, and expecting a result in > the TheReturn object, but neither is involved in the call to the web > service. > Hmm even with John Doe it dont work ;-) I have learn a bit from this blog http://loopback.codebetter.com/blogs...ebservice.aspx only it is writing in a another language. It look like i must declare Patients as a array of ThePatient, but i don't know how to do it. Then finaly i think/want to put the result of UitDeCOVClass.controleer(Patients) in TheReturn slometing like TheReturn TheReturn=UitDeCOVClass.controleer(Patients); but alsos that give me some errors. Gr, Rene |
|
#4
| |||
| |||
| Rene A wrote: > Hmm even with John Doe it dont work ;-) Strange... I was sure that would do it. ![]() > I have learn a bit from this blog > http://loopback.codebetter.com/blogs...ebservice.aspx > > only it is writing in a another language. Another language? It looks like C# to me... > It look like i must declare Patients as a array of ThePatient, but i > don't know how to do it. You don't know how to create an array, or...? Look at some of the example code from the page: ControleerInput requestMessage = new ControleerInput(); requestMessage.Verzekerden = new AanvraagCovType[0]; object responseMessage = ci.controleer(requestMessage); You need to create an array of AanvraagCovType objects, and assign that to the Verzekerden property of the ControleerInput object. > Then finaly i think/want to put the result of > UitDeCOVClass.controleer(Patients) in TheReturn slometing like TheReturn > > TheReturn=UitDeCOVClass.controleer(Patients); but alsos that give me > some errors. Well, "some errors" is way too unspecific to be helpful... The example code puts the result in a variable of the type object, while you are putting it in a variable of the type RetourinfoCovType. Check the intellisense for the method to see what it actually returns. -- Göran Andersson _____ http://www.guffa.com |
|
#5
| |||
| |||
| Göran Andersson schreef: > Rene A wrote: >> Hmm even with John Doe it dont work ;-) > > Strange... I was sure that would do it. ![]() > >> I have learn a bit from this blog >> http://loopback.codebetter.com/blogs...ebservice.aspx >> >> only it is writing in a another language. > > Another language? It looks like C# to me... > >> It look like i must declare Patients as a array of ThePatient, but i >> don't know how to do it. > > You don't know how to create an array, or...? > > Look at some of the example code from the page: > > ControleerInput requestMessage = new ControleerInput(); > requestMessage.Verzekerden = new AanvraagCovType[0]; > object responseMessage = ci.controleer(requestMessage); > > You need to create an array of AanvraagCovType objects, and assign that > to the Verzekerden property of the ControleerInput object. > >> Then finaly i think/want to put the result of >> UitDeCOVClass.controleer(Patients) in TheReturn slometing like TheReturn >> >> TheReturn=UitDeCOVClass.controleer(Patients); but alsos that give me >> some errors. > > Well, "some errors" is way too unspecific to be helpful... > > The example code puts the result in a variable of the type object, while > you are putting it in a variable of the type RetourinfoCovType. Check > the intellisense for the method to see what it actually returns. > Thanks for your help, i will give it a new try with your tips ! also take some reading in my "Visual C# the basic" book about arrays object... Normally i work with Delphi, and when i import the WSDL there i get nice functions and procedure's but there is the difficulty to work with security x509 certificates. Groetjes Rene. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.