After import the wsdl i have lost it a bit

This is a discussion on After import the wsdl i have lost it a bit within the CSharp forums in Programming Languages category; 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."); ...

Go Back   Application Development Forum > Programming Languages > CSharp

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-27-2008, 08:37 AM
Rene A
Guest
 
Default After import the wsdl i have lost it a bit

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));
}
Reply With Quote
  #2  
Old 08-27-2008, 09:57 PM
Göran Andersson
Guest
 
Default Re: After import the wsdl i have lost it a bit

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
Reply With Quote
  #3  
Old 08-28-2008, 03:07 AM
Rene A
Guest
 
Default Re: After import the wsdl i have lost it a bit

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
Reply With Quote
  #4  
Old 08-28-2008, 06:28 AM
Göran Andersson
Guest
 
Default Re: After import the wsdl i have lost it a bit

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
Reply With Quote
  #5  
Old 08-28-2008, 04:34 PM
Rene A
Guest
 
Default Re: After import the wsdl i have lost it a bit

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.

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:33 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.