Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Functions in WebService

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

How do I create a multi purpose WebService that can service different requests based on the parameter passed to it. Lets say we had a .dll that contains all the service functions related to our Widgets application like...

1. get city and state by passing the zip,

2. get zip by passing the city and state,

3. get unlock key by passing a string,

4. get uptime by passing an uptime function,

5 and on and on.

The idea here is I need to know how to build and call a multi function/procedure webservice, as all examples I've seen only has a single purpose function.

Also, can I create a webservice that has all company wide functions (for all our apps in a single "webservices.dll") that we would want to expose to a client process?

Thanks,
Stanley
 
In general you do a class OLEPUBLIC and use that as the core class of a web service. And it can of course have as many mehtods as you like, that's all to it.

You can also use as many non OLEOPBLIC classes from that olepublic webservice adapter/wrapper, as you like, it's just defining what is in the webservice.

Take a look at Soap Tololkit descriptions in the VFP help.

Bye, Olaf.

 
As Olaf says, a single web service can have multiple methods. In that respect, it's no different from any other class.

So, to answer your question, you could have a GetCityState method, a GetZip method, a GetUnlockKey method, and so.

Alternatively, it would be possible to have a single method, and make it so that the first parameter tells it what information you are asking for; the remaining paramters would then be whatever information you need to pass to get the particular item. But that approach seems a little clumsy, and not particularly convenient for the user (that is, the programmer who calls the service).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top