MICROSOFT.XMLHTTPS Issue

ToddStoon

New Member
I'm having a problem access the MICROSOFT.XMLHTTP object for a program I'm writing. I need to post information to a website and return the data. Below is my code:

CREATE "Microsoft.XMLHTTP" hOutputHTTPS NO-ERROR.

hOutputHTTPS:OPEN('POST', vURL,FALSE).

hOutputHTTPS:setRequestheader("Data-Content-Length", STRING(LENGTH(vOutputRec))).

hOutputHTTPS:setRequestheader("Data-Data", vOutputRec).

hOutputHTTPS:setRequestheader("Data-Length", STRING(LENGTH(vOutputRec))).

PROBLEM HERE
hOutputHTTPS:SEND("post=" + string(TODAY) + STRING(TIME)).
PROBLEM HERE

vReceivedLength=hOutputHTTPS:getResponseHeader("DrugPlan-Content-Length").
vReceivedRec=hOutputHTTPS:getResponseHeader("DrugPlan-Data").
ASSIGN
vWebstatus = hOutputHTTPS:STATUS.

RELEASE OBJECT hOutputHTTPS.

The problem is that the first time I run this code, the object correctly prompts me to pick a certificate. I pick the correct one for the site and then.... nothing.. It spins off in silence for about 2 minutes until I get the error message:

Error occurred while accessing component property/method: SEND.
The download the specified resource has failed.
Error code: 0x800200009 doTransaction comm/send.p

However if I then try re-running the code again in the program by pushing a button, it WILL succceed. Just the first time the https call doesn't seem to work. All subsequent calls are fast, efficient and exactly what I need. However my customer won't stand for a 2 minute error on the first transaction. ;-). Any ideas what I'm doing wrong or what I can do to fix this?

-Todd
 
Hi there.

Innovative way of doing a HTTPS connection, never tried doing a socket quite like that before. I'm not sure whats wrong with design methodology but have you tried using OpenEdge's built-in client socket with SSL?

You might get better support from Progress Tech Support.
 
Thanks for the response. I've done Progress sockets before but I'm not clear on how to incorporate certificates into it, nor implement a clean HTTPS call using it. Any info would be appreciated.
 
Back
Top