views:

51

answers:

1

I'm working with one legacy application written in VB5, and I need to give it the ability to consume a web service.

Anyone know how this can be done? I've heard that it can be done for VB6, but I don't have any detail on that either.

+4  A: 

Don't bother.

I don't mean that if they can't be bothered to upgrade the app from VB5 to VB6, then why bother adding web service functionality. I mean, just write a class in VB.NET to consume the web service and to expose it as a COM object. Then consume the COM object in the VB5 program.

I'm not sure web services even existed when VB5 was released - don't tempt fate by trying to get VB5 to deal with something it's never heard of.


Also, consider the following suggestion:

It may have been thought that there was no point in upgrading the VB5 application to VB6. Maybe it was thought that the application wasn't going to change much before it was replaced.

But the fact that you're here on SO talking about web services shows that the VB5 application still has some life left in it. You should consider at least the upgrade to VB6.

John Saunders
Good idea. Although the VB5 cannot be upgraded to VB6 because the component library supporting the financial API it is all hooked to was never upgraded to work with VB6 by the manufacturer of the API, and in any case it has been abandonware for several years now.
Cyberherbalist
@Cyberherbalist: I hope I'm never in the position of having my business depend on ancient, unsupported software.
John Saunders
Fortunately, it's only one small segment of the business. In the rest of the enterprise we're working in VS2005 and VS2008. Like many enterprises, however, we do have legacy apps that must be maintained and even enhanced. Up until recently, when an ASP.NET replacement was brought on board, I had to maintain, I-Swear-On-My-Father's-Sword, a VB3 app.
Cyberherbalist
@Cyberherbalist: some day, I'd like to understand businesses that think this sort of thing is acceptable practice. Preferably on my deathbed.
John Saunders
Instead of creating a new COM object in .net why not use MSXML? I guess it would depend on the complexity of the web service interface though.
Alexandre Jasmin
@Alexandre: because using "Add Service Reference" is a lot easier than parsing XML using MSXML.
John Saunders
@JohnSaunders: Well, as it turns out, it is not a business, it's a state government agency. LOL!
Cyberherbalist
@Cyberherbalist: _governments_, I understand, at least democratically-elected governments: "... democracy is the worst form of government except all those other forms ...", Churchill, see http://en.wikiquote.org/wiki/Winston_Churchill
John Saunders