Board index » cppbuilder » HELP - AV when calling a web-service from inside a web-service
const * const char ME
![]() CBuilder Developer |
HELP - AV when calling a web-service from inside a web-service2007-09-21 08:13:16 PM cppbuilder22 (Re-posted from another group). BCB6 patched. I have an ISAPI web-service (MyWebService1) which internally calls another web-service (MyWebService2) on another server. This call on all machines (but my own) throws an EAccessViolation. 1) I have implimented the fixes described at QualityCentral that require some rebuilding of the VCL (for bugs inside xmldoc, wsdlnode and OpToSoapDomConv). And for years this has been working just fine. Now however I have had to add the call from inside the ISAPI (MyWebService1) to a different web-service elsewhere (MyWebService2) and I am having the issue. 2) MyWebService1 is a static build (no runtime packages, no dynamic RTL). 3) On my machine it works every time. (Except in one case - read on). On other machines it fails every time. The web-app de{*word*81} module version works every time on all machines. 4) I wrote a simple win32 test application that uses the exact same import of MyWebService2 to invoke the methods and it works fine every time on all machines. 5) On other machines an AV is thrown when any method of the interface is called. The interface pointer is obtained normally and is definitely not NULL. It doesnt matter which method I call, all methods {*word*88} the same way. 6) From monitoring the code and communication on the remote machine - the call is defiinitely not being transmitted. In trying to trace to the point to where the AV happens, I have been adding OutputDebugString() to the code into deeper and deeper layers and then executing it on another machine (which shows the bad behaviour). I do not have remote debugging unfortunately. Finally I have found myself inside TRIO.Generic. and TRIO.GenericStub. (Found inside unit RIO.pas) and I still can not seem to locate it. First I tried adding a message inside Generic() and found it was too late - GenericStub seemed to be throwing the Exception. Fine, so I added a message to GenericStub as the first line. Still it doesnt seem early enough... where the hell is this thring throwing the AV from? It does not seem to be any of the units I have rebuilt from the VCL (the only one involved seems to be OpToSoapDomConv and its methods dont get called before the AV happens). Why cant I reproduce it on my machine? Every other machine has the problem (I stinks like a machine config problem - but I cant see it, I have triple checked everything I can think of). And I am fairly certain it is a static link - so all the dependencies should be taken care of.... what am I missing? Here is some code: bool __fastcall TMyWebService1::DoStuff(AnsiString & AServerErrorMsg) { // get the ws interface pointer (I have tried several combinations // of UseWSDL and Addr in this call, all with the same results) _di_IMyWebService2 pIPS = GetIMyWebService2(true); if (!pIPS) freak out; // call a method: const int InterfaceVer = pIPS->InterfaceVersion(); // ** crashes before the method is actually sent. } Any ideas? HELP! |