Click here to Skip to main content
15,795,791 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello friends,
I have a application where VB6 will Send response to Soap Tool Kit and then Soap will get response from a web service and revert that response back to VB6 application.

Untill here, are you clear?

Now, Soap Tool kit acts a Middleware in my current archietecture, isn't?

Now i want to get rid of SOAP Tool Kit, instead i want to develop a C# app which communicates with web service and return the response to VB6 !!

What I have tried:

My Trials,
1) i have developed a C# console application and calling Web Service from this console app and then saving the result in text file.
Then i run VB6 application and get the data from that Text file.

2) So, i don't want to save the result in text file instead directly pass the result from C# Console application to VB6 application.

Your suggestions and comments are welcomed.
Updated 21-Dec-17 16:37pm

1 solution

I think you need to look at your architecture and question why you need a C# console application to act as a middle man between the Web Service (presumably the soap webservice) and your vb6 forms.

I'm slightly confused to your question so to establish my understanding here is what I think you've got. You currently have 3 apps. A VB6 application, a SOAP web service and a web service (this second web service may be same as SOAP??).

So i think there are 2 ways to answer your question.

1) I don't think you need a console application to act as a middle man/replacement for your web service to communicate to your vb6 application. In this scenario I'm assuming you have 2 web services and are replacing the soap web service with the console application.

In the event you don't control the web service you are calling, create an intermediary web service in c# (say...web api) that does what you need to the file and then the result of the intermediary c# web service would be to provide either a URL or bytes of your file to download when called.

So in this scenario you have
* a web service
* VB6 app
* C# web service

The c# web service gets the data from "a web service" and manipulates it into whatever format you need the vb6 app to consume it in.

2) The second option, if "a web service" and the SOAP web service are the same thing, then just build a C# web service (web API) to replace your soap web service and make all your calls to the new C# web service from VB6.

The only reason I can think of that you would need a console app is if you are doing a self hosted WCF web service or something like that which you did not indicate/it isn't clear if that is what you mean.

But in short, I think you need to look at your architecture and evaluate if you really need a console application and look into why you can't do the web service calls in your vb6 app instead of trying to off load it into a console app. The 2 options I suggested are 2 of many different routes you could take to solve your issues I'm sure...I just don't know enough of what you are doing.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900