[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

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

Tim Rogers

8/21/2003 4:25:00 PM

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


2 Answers

Christian Weyer

8/22/2003 10:34:00 AM

0

Hi,
did you take a look at VS7's capabilities of consuming Web services in unmanaged code? Really neat.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vbwlkwalkthroughusingwebservicewithunmanag...
Alternatively you may actually want to use the SOAP Toolkit V 3, but I would not recommend this way as I think there won't be any newer versions of it in the future.
Cheers,
--
Christian Weyer
Microsoft .NET & Service Oriented Architectures

[Microsoft Regional Director, Germany]
http://www.regionaldir...

* XML Web Services: http://www.xmlwebse...
* Weblog: http://weblogs.asp.n...



> 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
>
>

scottNOgregorySPAM

8/22/2003 12:23:00 PM

0

In article <vk9sittn06io13@corp.supernews.com>, Tim Rogers says...
>
>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