Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VB6 connect to WCF

Tags:

wcf

vb6

How can I create a VB6 client connect to WCF web service?

Is there any better solution to create web service instead of using WCF, so that it is lot more easier to connect from VB6?

like image 636
kelvinfix Avatar asked Jan 25 '26 06:01

kelvinfix


1 Answers

It really depends on what your requirements are exactly. Here are some suggestions:

  1. You can write a .NET assembly that has a service reference to the WCF service, and have a wrapper class in that that isexposed as a COM object. You can access the VB6 web app from that. The only concern is what the app.config file would be called in this case. That is easy enough to find out via AppDomain.CurrentDomain.SetupInformation.ConfigurationFile as this stackoverflow answer illustrates. If your VB6 app is on the same LAN as your service this will have the advantage of allowing you to use netTcpBinding which would have less overhead than the http bindings. You could also get really exotic and use something like netMsmqBinding if you need disconnected access to the service.
  2. The deprecated Soap Toolkit 3.0 has a COM SOAP client. I would probably stick to basicHttpBinding if I was going to attempt to use that.
  3. If your service is relatively simple in the parameters it takes and the values it returns, you might want to consider using webHttpBinding, making raw http calls, and parsing the results yourself.
like image 122
Justin Dearing Avatar answered Jan 28 '26 21:01

Justin Dearing



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!