[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Strange: my web service client (HTTPAPI-based) works fine in tests, but we're getting failures in the field
We've got my HTTPAPI-based client for our authorization code update web
service into the current release of QuestView, but for some reason,
we've got it failing on a number of customer boxes.
They are successfully downloading the new release by FTP from our
"web-based-crm.com" FTP site, but when the installation program calls my
new client, and it tries to do an HTTP "GET" from our web service at
"wintouch.touchtonecorp.com", it fails.
Yet the same customer can easily open up a browser on
"wintouch.touchtonecorp.com" and get its standard reply to anything that
isn't a valid authorization code request.
I'm using "http_url_get_raw," and the callback routine I'm passing it
just sticks the incoming data into a string variable. Here's the
relevant portion of the code, with the proprietary information censored.
> c eval rc = http_url_get_raw(
> c 'HTTP://wintouch.touchtonecorp.com/'+
> c CENSORED: 1 :
> c %PADDR('INCOMING'))
. . .
> C rc ifne 1
> C failed dsply foo 1
> C seton LR
> C return
> C endif
. . .
> P incoming B
> D incoming PI 10I 0
> D descriptor 10I 0 value
> D data 8192A options(*varsize)
> D datalen 10I 0 value
>
> C* Make sure we don't overflow the string:
> c eval retlen = (nextpos + datalen) - 1
> c if retlen > %size(retdata)
> c eval datalen=datalen-(retlen-%size(retdata))
> c endif
>
> C* If there is nothing to write, return THAT...
> c if datalen < 1
> c return 0
> c endif
>
> C* Here we add any data sent to the end of our 'retdata' string:
> c eval %subst(retdata: nextpos) =
> c %subst(data:1:datalen)
> c eval nextpos = nextpos + datalen
> c* We always return the amount of data that we wrote. Note
> C* that if http-api sees that we didn't write as much data as
> C* it sent us, it'll abort the process with an error message.
> c return datalen
> P E
"Failed" is just a short message indicating that the web service
couldn't be reached. Unfortunately, in the current version, I don't
display what *does* come back in "rc." Ain't 20-20 hindsight wonderful?
--
James H. H. Lampert
Touchtone Corporation
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------