Native C++ Client To Call Managed C++ Web Service

T

Tim Rogers

We've currently got a C++ client/server app that uses DCOM in order to make
remote calls. We want to replace DCOM with a .NET Web Service. The server
piece seems clear to me. I can write it using MC++ and then can call my
native C++ server code from within the Web Service. What I am unsure about
is the client piece.

The GUI is written in C++. Will I be able to call the Web Service from
native C++ code? At first, I thought I would have a managed class (in a
DLL) that would proxy all the calls to the web service. Now I'm not sure if
I would be able to call the managed class' methods, or even load a managed
DLL, from an unmanaged application. I also think there is a SOAP toolkit
that I can use in my native code to make calls to the web service, but not
sure if that would be a good approach.

Basically, I'm just looking for some advice on what would be the best way to
code the client piece of this web service (i.e. basically how to call
managed code from unmanaged code). Any suggestions would be greatly
appreciated.

Thanks,

Tim Rogers
 
G

Guest

We've currently got a C++ client/server app that uses DCOM in order to make
remote calls. We want to replace DCOM with a .NET Web Service. The server
piece seems clear to me. I can write it using MC++ and then can call my
native C++ server code from within the Web Service. What I am unsure about
is the client piece.

Apart from asking 'why' you need/want to do this in the first place, i.e. don't
mess with working code, you have what is, to me, another good alternative. ATL
Server means you can code in the unmanaged C++ you know, and produce a
fast/robust web service on the server side.

The GUI is written in C++. Will I be able to call the Web Service from
native C++ code? At first, I thought I would have a managed class (in a
DLL) that would proxy all the calls to the web service. Now I'm not sure if
I would be able to call the managed class' methods, or even load a managed
DLL, from an unmanaged application. I also think there is a SOAP toolkit
that I can use in my native code to make calls to the web service, but not
sure if that would be a good approach.

Similarly, unless you have a compelling reason at this time to put the .Net
runtime on all of you client machines and run it that way, then using the SOAP
toolkit or the like would be a good way to go.

Good Luck
sdg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top