From: Edje.Rommel on 29 Aug 2006 16:38 Hello, I've have a problem with a webservice. I just want to validate a VAT number by country code and VAT numer. The return value should be like "it's valid" and/or the name where it's registered to. To do this i can access the webservice on the following location: http://ec.europa.eu/taxation_customs/vies/api/checkVatPort A WSDL file is also available: http://ec.europa.eu/taxation_customs/vies/api/checkVatPort?wsdl. My question is how can i get the results i want. Can someone help me with just the little module that does the request. I already right-click on Web reference and added http://ec.europa.eu/taxation_customs/vies/api/checkVatPort?wsdl, but when i want to use checkvat(country,VAT), it exepect 3 other fields and the return type seem to be date. My understanding is that i only have to use 2 parameters (via XML ?), and retrieve a string value (XML ?) I just need something like returnvalue = doRequest(country,VAT).valid Name = returnvalue.Name Valid = returnvalue.valid etc..... Thanks for all your help. Regards, Edje
From: adm on 29 Aug 2006 17:29 Edje.Rommel(a)gmail.com wrote: > My question is how can i get the results i want. Can someone help me > with just the little module that does the request. Once you've added the web reference, you can do this sort of thing in a method or sub: Dim ws As New WindowsApplication1.eu.europa.ec.checkVatService Dim result As Date result = ws.checkVat("US", "20", True, "sample", "address") The web service you mentioned has at least two methods: checkVatService and checkVatServiceAsync. The latter is only looking for two input parameters, but it doesn't return a value. The former returns a value (a date), but expects five input parameters (which will show up in Intellisense). I don't know enough about this webservice to say what values in those parameters are valid, but I can tell you that the values in my example above are the right data type but cause an error, so obviously something is wrong with them. But if you know the right range of values to pass in, you should be able to get a valid response (a date) back. hth a little bit. adm
From: adm on 29 Aug 2006 17:29 Edje.Rommel(a)gmail.com wrote: > My question is how can i get the results i want. Can someone help me > with just the little module that does the request. Once you've added the web reference, you can do this sort of thing in a method or sub: Dim ws As New WindowsApplication1.eu.europa.ec.checkVatService Dim result As Date result = ws.checkVat("US", "20", True, "sample", "address") The web service you mentioned has at least two methods: checkVatService and checkVatServiceAsync. The latter is only looking for two input parameters, but it doesn't return a value. The former returns a value (a date), but expects five input parameters (which will show up in Intellisense). I don't know enough about this webservice to say what values in those parameters are valid, but I can tell you that the values in my example above are the right data type but cause an error, so obviously something is wrong with them. But if you know the right range of values to pass in, you should be able to get a valid response (a date) back. hth a little bit. adm
From: adm on 29 Aug 2006 18:09 adm wrote: > I don't know enough about this webservice to say what values in those > parameters are valid, but I can tell you that the values in my example > above are the right data type but cause an error, so obviously > something is wrong with them. Ok, I looked into VAT numbers a little bit so I could better understand what kinds of values the web service is expecting. The values I passed in above are not right: the web method is expecting (at least) two strings, not a string and a number. I changed my code to: ws.checkVat("CZ", "991231123") But I am getting an {INVALID_INPUT} error back. When I run equivalent code in PHP, it seems to work fine, that is, there is no error thrown, and I get an array back with the values I passed to the service. This leads me to believe that the SOAP service is not accepting parameters from the .NET client in the way that we are used to seeing with .NET-based web services. So maybe these parameters need to be presented to the service differently. If someone has some expertise in passing "complex" parameters to non-.NET web services, maybe they can chime in with the (simple?) solution.
From: adm on 29 Aug 2006 18:09 adm wrote: > I don't know enough about this webservice to say what values in those > parameters are valid, but I can tell you that the values in my example > above are the right data type but cause an error, so obviously > something is wrong with them. Ok, I looked into VAT numbers a little bit so I could better understand what kinds of values the web service is expecting. The values I passed in above are not right: the web method is expecting (at least) two strings, not a string and a number. I changed my code to: ws.checkVat("CZ", "991231123") But I am getting an {INVALID_INPUT} error back. When I run equivalent code in PHP, it seems to work fine, that is, there is no error thrown, and I get an array back with the values I passed to the service. This leads me to believe that the SOAP service is not accepting parameters from the .NET client in the way that we are used to seeing with .NET-based web services. So maybe these parameters need to be presented to the service differently. If someone has some expertise in passing "complex" parameters to non-.NET web services, maybe they can chime in with the (simple?) solution.
|
Next
|
Last
Pages: 1 2 3 4 Prev: SplitContainer Next: Retrieving COM class Factory failed: 8007007f |