> > I have a C++ application that consumes a web service. I would like to
> > call
[quoted text clipped - 8 lines]
>
> -Drew
> The proxy was generated automatically when I added the web service as
> a reference to my C++ application, so it was generated in C++ by
> Visual Studio. Do I have to add anything to the generated proxy to get
> the asynchronous calls, I thought it should do it automatically?
Wow, wasn't even aware it generated proxies in C++ to be honest with you. Typically, yes, these methods are generated for you when using wsdl.exe. In fact, even though I rarely touch C++ anymore, I just went and crufted up a test app and if I look in the localhost.h file for the test web service i have setup I *do* see async methods:
<codeSnippet language="MC++">
/// <remarks/>
public: System::IAsyncResult * BeginReturnXmlNode(System::AsyncCallback * callback, System::Object * asyncState);
/// <remarks/>
public: System::Xml::XmlNode * EndReturnXmlNode(System::IAsyncResult * asyncResult);
</codeSnippet>
HTH,
Drew
rgarf - 24 Nov 2004 14:49 GMT
My C++ application is a MFC application, was yours a .Net app, if yes could
be different.
So how can I do Asynchronous web method calls from my C++ application if my
proxy files does not have the begin & end functions?
> > The proxy was generated automatically when I added the web service as
> > a reference to my C++ application, so it was generated in C++ by
[quoted text clipped - 13 lines]
> HTH,
> Drew
Drew Marsh - 24 Nov 2004 16:35 GMT
> My C++ application is a MFC application, was yours a .Net app, if yes
> could
> be different.
> So how can I do Asynchronous web method calls from my C++ application
> if my
> proxy files does not have the begin & end functions?
Yes, mine was an MC++ .NET WinForms app. I just tried a no MC++ app, just Win32, and it appears the logic behind "Add Web Reference" in that type of project is a completely different beast. It couldn't even handle some simple XSD stuff I had defined. Once I commented that the schema that was causing problems for it, I found exactly what you found: no async methods. This makes sense though, because you're no longer using .NET which comes with async built right in. Therefore it looks like you'd have to emulate it yourself by managing your own threads when using pure C++.
HTH,
Drew