c++ atlsoap fails on MS terraserver->getareafrompt method

  • Thread starter Thread starter netkev
  • Start date Start date
N

netkev

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...7ba0e893dcaed?q=m_spReader->parse(varStream);
http://groups-beta.google.com/group...b80118533157b?q=m_spReader->parse(varStream);
 
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

--
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/
 
Back
Top