Overriding CSoapHandler::InitializeHandler in ATL Server webservice ?

J

john sparrow

Hi There!

I have an ATL Server Webservice created with the VS
Wizard. In that service I wish to Initialize
an ISAPI service (through a call to the
m_spServiceProvider member) for that handler. I figure the
place to do it is in an override of the InitializeHandler
() member function but according to the documentation a
lot of initalization goes on in the
CSoapHandler::InitializeHAndler() so I thought I would do
my initialization and then call:

__super::InitializeHandler( pRequestInfo, pProvider );

to make sure I get all the initialization of the
CSoapHandler version. This however doesn't seem to work.
My webservice client times out waiting for the webservice
to initialize....

Why is that?

I have tried leaving out the call to "__super..." abd just
return HHTP_SUCCESS from my InitializeHAndler but the
result is the same.

Q2: Why is there no separate ATL Server newsgroup?

Any help much appreciated.
 
B

Bogdan Crivat [MSFT]

Hello, John

Could you please provide a few more details on your ISAPI service? How do
you initialize it?
Based on your description, the problem seems to be in the ISAPI service
initialization.
You need to call __super::InitializeHandler( pRequestInfo, pProvider); ,
the Soap Handler will not work without this step.

Also, InitializeHandler is invoked for each request. If you want to
initialize your ISAPI service (which, most likely, is to be used by multiple
request handler instances)
you might need to move the initializzation code in the GetExtensionVersion
method of you CIsapiExtension derivative.



--
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. It is for newsgroup
purposes only.

thanks,
bogdan
 
G

Guest

Hello Bogdan,

I guess I didn't express myself very clearly ;-). I have
an ISAPI service that I want to use from
several "soap_methods" in my handler. One approach I could
use is to call m_spServiceProvider->QueryService() for the
service in each "soap_method". Since one request maps to
an invocation of one "soap_method" and one only I guess
this would be okay. However, instead of having duplicate
code in all of my "soap_method" definitions I thought it
would be nicer to query for the service in
InitializeHandler().

I tried this and called __super::InitializeHandler(
pRequestInfo, pProvider); and my service stalled, but it
was because I messed up; I called the __super after I did
my own initialization instead of before. Pure stupidity on
my part. Now, when I call __super first thing everything
works like a charm.

Thanks for your response though, and thank you for a great
book on ATL Server!

BR

JS
 

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