powerbuildergeturl

geturl powerbuilder behavior change


I have been use the function GetUrl to save an xml obtained from a web page without problems, but two days ago, it started to gave me an error when downloading.

The following is the code for the function that is called to perform the retrieve and saving of the file:

Arguments for the function are: S_PATH_URL as string S_INVOICE_NO as string

Integer li_rc
String ls_filename, s_FILEPATH
string s_XMLdata
blob b_XML
long li_filesave


SetPointer(HourGlass!)

li_rc = iinet_base.GetURL(s_PATHURL, in_irdata)

IF li_rc = 1 THEN

s_FILEPATH = "C:\SIA\" 

s_XMLdata =  String(in_irdata.iblob_data, EncodingUTF8!)
s_XMLdata = Remove_xtrachars (s_XMLdata)
b_XML = Blob(s_XMLdata, EncodingUTF8!)

ls_filename = s_FILEPATH + s_INVOICENUM + ".xml"

in_irdata.of_WriteFile(ls_filename, b_XML)

MessageBox("Success", "XML File Successfully downloaded")
SetPointer(Arrow!)
    RETURN 0
ELSE
   MessageBox("Error", "GetURL Failed")
   SetPointer(Arrow!)
   RETURN -1
END IF

The URL path that is provided in S_PATHURL is like the following:

https://www.facturadigital.com.mx/sistemacfdi32/webservices/getxml_secure.php?token=6d2d1d3acffb0655f2f90c0c29333569f1d40fb8

what changes is the token content. Obviously, if I put this in a browser, it works. It was working well, but as I said, two weeks ago, the GetUrl function always return -1 when called...

Any hints?....


Solution

  • Has the security certificate from the server you are connecting to expired?