Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a .NET WebService
Message
De
03/02/2010 09:12:04
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Vista
Divers
Thread ID:
01447226
Message ID:
01447251
Vues:
67
>>you are right, I am using the service used by VS, but my VS is still active and the ASP.NET Development Server is running on port >>49780.
>>I did paste the URL into IE8 and had access to the service. So strange I'm getting the error in VFP, isn't it ?
>>I clicked on the 'Rick Strahl' link Gary gave me, but did'n found what I 'm looking for. I do believe I understand what the two of you >>are saying, but I don't know how to begin ...

Fo more info on using a webservice from within Foxpro have a look at this article;
http://www.west-wind.com/presentations/foxpronetwebservices/foxpronetwebservices.asp

If you want to use my approach, then;

1. Create a class library project in Visual Studio (C# or VB does not matter).
2. Add a web reference to the webservice you use.
3. Personally I then mirror the methods of the webservice that I want in my class library as this give me the oppurtunity to validate parameters but you could just expose the webservice.
4. build into a COM DLL

In Foxpro you can then just use CreateObject() to create an instance of your Class.

I have used this approach to consume a number of webservices and it works well. Also it add flexibility in that you can send simple parameters to your DLL and it can built XML objects or complex objects much easier that Foxpro and pass then to your WebService.

Gary.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform