COM error

Started by Mogens Christensen, December 21, 2015, 06:08:39 AM

Previous topic - Next topic

Mogens Christensen

Hello!


Executing this program, abends with this message

[Error Reporting]
3052=responsepage
[WBDLB44I]
LastError=32 (CopyFile)
[COM Sub-system]
Function=InvokeMember
ErrorCode=9 (0x80020009)
ErrorDesc=Exception occurred.

Any help is appreciated
Happy christmas




soap_text = FileGetW("\\topdanmark\datadfs\data\autoit\kmv_soap.xml","")
(0) VALUE UNICODE => <?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <getKoeretoejModelVarianterRegisterRecordsByDatetime xmlns="http://tempuri.org/">
      <SystemudbyderId>ea4c3293-30a4-4507-993d-d3853e8e828f</SystemudbyderId>
      <DatoSenestRettet>ZZZZ</DatoSenestRettet>
    </getKoeretoejModelVarianterRegisterRecordsByDatetime>
  </soap12:Body>
</soap12:Envelope>

soap_text = StrReplace(soap_text,'ZZZZ','2015-12-16')
(0) VALUE UNICODE => <?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <getKoeretoejModelVarianterRegisterRecordsByDatetime xmlns="http://tempuri.org/">
      <SystemudbyderId>ea4c3293-30a4-4507-993d-d3853e8e828f</SystemudbyderId>
      <DatoSenestRettet>2015-12-16</DatoSenestRettet>
    </getKoeretoejModelVarianterRegisterRecordsByDatetime>
  </soap12:Body>
</soap12:Envelope>

http = ObjectCreate("WinHttp.WinHttpRequest.5.1")
(15) VALUE INT/COMOBJ => 9802472

http.open("POST","http://wsbilregister.autoit.dk/BilregisterService.asmx","False")
(15) VALUE VARIANT_EMPTY =>

http.setRequestHeader("Content-Type","text/xml; charset=utf-8")
(15) VALUE VARIANT_EMPTY =>

http.setRequestHeader("Content-Length","9999999")
(15) VALUE VARIANT_EMPTY =>

http.setRequestHeader("Host","wsbilregister.autoit.dk")
(15) VALUE VARIANT_EMPTY =>

http.setRequestHeader("SOAPAction","http://tempuri.org/getKoeretoejModelVarianterRegisterRecordsByTimeframe")
(15) VALUE VARIANT_EMPTY =>

http.send(soap_text)
(21031) GOSUB Error handler

WIL ERROR SUPPRESSED =>1261 (COM/CLR: Exception)

td

Hard to say.  The list of possible issues is long.  If you were using a newer version of WinBatch, the is some chance that you would get more detailed error information.  If you haven't yet, you may also  want to check out the following Tech Database article which provides a brief overview of SOAP and WinBatch

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/XML+SOAP.txt

The article is a bit dated since it does not cover using WinBatch CLR hosting (dotNet) to access SOAP services.  Another option is MSFT's SOAP toolkit COM Automation objects which have been deprecated but still works on Windows 7 anyway. 

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

Mogens Christensen

i use the newest version of Winbatch
How do i get this detailed error infos.
What is your  surgestion using WinHttp.WinHttpRequest.5.1 , Msxml2.ServerXMLHTTP.6.0 or Microsoft.XMLHTTP ?
Thanks for an exelent product

td

"WBDLB44I" is certainly not the latest version of WinBatch but that could just be an old entry in the wwwbatch.ini file.  However, the section name 'COM Sub-system' is not longer used by WinBatch. The latest version of WinBatch now uses 'COM & CLR Sub-system' and COM errors always write something to the wwwbatch.ini file.  You should have the new section name in your trace file if you are using the latest version of WinBatch.  Also with the latest version of WinBatch you may also have a 'COM/CLR Exception' section name in the wwwbatch.ini file that contains any additional error information provided by the COM Automation object throwing the exception, if the object provided any additional information.   These section names and information will appear in your trace file, if you are using the latest version of WinBatch.  You can also check the wwwbatch.ini file directly in case the trace file didn't pick up everything in the ini file.

As for your SOAP request, you will have to determine whether or not the server is accessible and whether or not you have formatted your XML request correctly.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

Mogens Christensen

Sorry, the right error message was in the bottom of the WWWBATCH.INI file

[COM/CLR Exception]
WinHttp.WinHttpRequest=The data necessary to complete this operation is not yet available.


[COM & CLR Sub-system]
Function=InvokeMember
ErrorCode=9 (0x80020009)
ErrorDesc=Exception occurred.


THE Winbatch version is

Mon 21-12-2015 14:49:25
WinBatch 32 2015B
WIL DLL 6.15bob
D:\CMD\xppfabkmv.exe
Windows platform: NT, version: 6.1, build: 7601 (Service Pack 1)
ErrorMode: @CANCEL
Valid Code Signature: No
UAC Manifest Settings: level="asInvoker" uiAccess="false"
UAC Elevation Level: Standard User or Disabled

td

'The data necessary to complete this operation is not yet available.' suggests your server is not happy with your request. Perhaps review the site's documentation to determine what the site is unhappy about.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

Another simple way to test would be with Powershell - here is an article to get you started

http://mgicomputers.com/tech-news/getting-started-with-soap-based-web-services-and-powershell

You can also execute Powershell code through Winbatch.