I added the microsoft terraserver wsdl(version 2) as a web reference to
my c++ application(vs.net 2k3). When I attempt to execute the
getAreaFromPT method, I get an 'unspecified error' HRRESULT. This
happens after it successfully sends the soap msg to the web service and
recieves a well-formed response. I traced the problem to the parsing
stage after receiving the response. Calling other methods from this
same web service and others *do* work successfully.
My instinct is to assume I've made a mistake since I would think that
microsoft would ensure compatibility between their web service and
their dev studio. Below are the details of the code and where it
fails.
CoInitialize(NULL);
TerraService::CTerraService *ts = new TerraService::CTerraService();
ts->SetProxy((LPCTSTR)"my.proxy.host.com",31060);
TerraService::LonLatPt *center = new TerraService::LonLatPt();
center->Lat = 33.8168;
center->Lon = -118.1605;
int theme = 4;
TerraService::Scale *scl = new TerraService::Scale();
*scl = TerraService::Scale500mm;
TerraService::AreaBoundingBox abb_result;
HRESULT hr1 =
ts->GetAreaFromPt(*center,theme,*scl,200,200,&abb_result); //returns
code for unspecified error
I traced the failing point to the following code in atlsoap.h but the
debugger will not allow me to 'step into' further:
m_spReader->parse(varStream); //returns ES_FAIL
I found the following related articles but neither of them posted a
fix. They mention modifying atlsoap.h :(:
http://groups-beta.google.com/group/microsoft.public.msdn.soaptoolkit/browse_thr
ead/thread/18d87fd9c8ec21d8/0b67ba0e893dcaed?q=m_spReader-%3Eparse(varStream);
http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vc/browse_
thread/thread/f27647fc631c00a5/559b80118533157b?q=m_spReader-%3Eparse(varStream);
Nikola Dudar [MSFT] - 11 Mar 2005 06:12 GMT
I will start with a good news - this works just fine in latest builds of
Beta 2. The bad news that this is a bug in ATL Soap parsing and,
unfortunately, I cannot think of a workaround for this.
Thanks,
Nikola

Signature
Nikola Dudar
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Suggestions? Bugs? Feedback? Talk directly to dev teams using
http://lab.msdn.microsoft.com/productfeedback/
>I added the microsoft terraserver wsdl(version 2) as a web reference to
> my c++ application(vs.net 2k3). When I attempt to execute the
[quoted text clipped - 31 lines]
> http://groups-beta.google.com/group/microsoft.public.msdn.soaptoolkit/browse_thr
ead/thread/18d87fd9c8ec21d8/0b67ba0e893dcaed?q=m_spReader-%3Eparse(varStream);
> http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vc/browse_
thread/thread/f27647fc631c00a5/559b80118533157b?q=m_spReader-%3Eparse(varStream);