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!

Web Service Woes...

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

Anyone out there successful in building web services with VFP9? I've attempted this 4-5 time over the past 2 years without ever being successful. It always in the publishing part. I're read every implementation and every article concerning this with most authors admitting that it is a pia. My last attempt was trying to follow MS article using Visual Studio to do the job. Is soap still relevant as it appears to be old and no longer supported. I'm using Win8-64 and VFP9sp2. If soap is dead, then how is the best and most RELIABLE method of doing this? Use soap or not? If yes, what version? Do I have to use different versions for xp, win7, and win8 and soon win10?

Just asking for help from someone that reliable uses vfp generated web services and what it takes to pull it off.

Thanks,
Stanley

 
WOW, no one doing this???

Thanks, Stanley
 
Not in VFP.

Any time I did any VFP-based web services I always used WestWind's WWC tools. -- it's a generally helpful site whenever you do anything that touches the web.
 
Hi Dan,

Have you found it to be problematic in vfp, hence the need for Rick's tools? Just wondering if my experience with vfp web services is with me or ??

And should they be avoided? If not, then use Rick's solution? I did look at his solution a while back and as I recall he was using Visual Studio with vfp with a 2-3 page script to make it work. I eventually abandoned it as I failed at that too.

Thanks,
Stanley

 
I've seen Rick recommend using .Net to do web services then use COM Interop to get the data into/out of VFP. For the most part, SOAP is dead. Most people are doing REST web services now.

Craig Berntson
.Net MVP, Author, Tech Presenter
 
I've seen Rick recommend using .Net to do web services then use COM Interop to get the data into/out of VFP.

I agree. That's more or less what we did on a recent project. We tried to do the whole thing in VFP, but it was an exercise in frustration.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thanks guys...

Thanks for confirming that its vfp and not me... I'll retry Rick's solution again.

Thanks again,
Stanley
 
Fully agree, once you get into web services, then you realise the lmits of VFP.

The reccomended dotNet method is to use the NuGet package, Microsoft.AspNet.WebApi.Client. This means you do not have go messing about figuring out all the complications of HtttpRequests, building up magic strings with quotes within quotes etc . It also includes support for JSON data and many/most REST services now send data back/forth in JSON rather than XML format. AND you can link this to your VFP " sort of " , do all the dotNet stuff in a dotNet windows form and then use Interop to show the form in VFP.

What I have done on a few occasions is to use Sqlite as the back-end data-base, means the client ( or you ) does not have to worry about setting up/ admin of SqlServer. Sqlite is just a simple 'copy to deploy', but is almost identical to SqlServer in all of the techniques that you would use. It is not designed for large numbers of multiple users, but if we are talking VFP style situations,then it should be fine for up to a few hundred.
 
Hi clipper01,

Thanks for the recommended route...

>> do all the dotNet stuff in a dotNet windows form and then use Interop to show the form in VFP
How can show a dotNet window in VFP? Please explain this process... Is this a clunky solution, or clean? Can the end user tell that its 2 technologies mashed together, or is it seamless?

>> it should be fine for up to a few hundred
A few hundred of what?

Thanks,
Stanley

 
re dotNet,depends what stage you are at, if just starting, do a Hello World forms application and google VFP / Interop to get going. A typical user screen looks almost the same as VFP, grids , text-boxes , combo's etc

re "few hundred" , Sqlite locks the full data-base for an update, but the duration of the lock is only a millisecond or so . So if you a few hundred users on say a typical VFP type multi-user network app, for any given short time, the chance of direct simultaneous lock requests are very unlikely to happen, and if a conflict does happen, it retries in a few milliseconds. So I have found that Sqlite is a very good way of working dotNet along side VFP to handle the dotNet side of things on a network app that has a few hundred users. Avoids the hassle of getting install/admin permissions etc, especially if the client has no IT guru.

But as a data-base for a web service, you are probably better to use Sql Server as you usually have more control of your own admin with your service provider
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top