Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Guidance on creating a web service
Message
De
07/04/2006 19:35:02
 
 
À
07/04/2006 19:01:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01111307
Message ID:
01111635
Vues:
13
>>Thanks. The next thing is, how do you (or others) suggest I go about setting up the web service, and what does the app make a call to it? I am totaly new at this. No experience at all.
>
>Well, I assume you would like to do it both ways in VFP as this is in VFP forum. So, I would recommend an XML Web Service in this case, where you could XmltoCursor() on the client side to obtain a cursor. From then, you have everything in records ready for your analysis.
>
>Basically, the client would probably pass a username, a password and the directory of which the required listing is demanded. Or, you can do a Login() method and create a session that you will pass instead of always passing the username and password for every method.
>
>As for the server side, basically, you do as in VFP with an ADIR(), for example, and would build a cursor. Then, before returning the string, just do CursorToXml() so the XML string would be passed.

Thanks.

What I have in mind as the first task of the web service, to be much expanded later on, is telling client which is the latest version of the product. So I imagine code at client would go something like this:

* 1) Tell VFP how to reach web service "MakeCall". I don't know how to do this.

* 2) Prepare message
lcDesiredFunction = 'GET_LATEST_VERSION'
lcParameters = 'Parameter1' + ',' + 'Parameter2' && etc
lcInstallationID = 'xxxx'
lcInstallationPassword = 'yyyy'
lcMessage = lcDesiredFunction + '|' + lcParameters + '|' + lcInstallationID + '|' + lcInstallationPassword
lcEncryptedMessage = EncryptString(lcMessage)

* 3) Make call and receive answer. Must take precautions in case there is no answer
lcAnswer = MakeCall(lcEncryptedString)

Questions:
1) Is this approximately how a call is made?
2) How would I tell VFP where the WebService resides?
3) I think web call should be made to a named internet address, not an IP number, to allow later change of IP address.
4) I there a role for a port number here, and how would you do it?

Thank you for your help.

Alex
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform