Skip to Content
0

PostURL from PowerBuilder 9 to 12.6

Oct 20, 2016 at 04:54 PM

222

avatar image
Former Member

We have an ASP service from an external provider of our application running in PowerBuilder 9, we invoke this service as well:

inet linet_main

n_cst_internet luo_data

...

ls_url=http://10.0.0.21/samweb.asp?

lblb_args=blob("banco=0045∏ucto=20&token=Cod_Oper=090|Banco=0045|Sucursal=0500|Fecha_neg=20151124|UsuarioBD=IJQQQQQQQQQQQQQQQQQQ|PwdBD=IJQQQQQQQQQQQQQQQQQQ|Cod_Barras=017694667802006051800000035109|Adicional=")

ls_headers= "Content-Type:application/x-www-form-urlencoded~n Content-Length: " + String( ll_length ) + "~n~n"

...

ll_ret = linet_main.PostURL(ls_url,lblb_args,ls_headers,ll_puerto,luo_data)

We migrated the application to PowerBuilder 12.6, and now returns: -6 Internet request failed


What could be the problem?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

avatar image
Former Member Oct 20, 2016 at 06:50 PM
0

My guess is that it has to do with PB 12.6 being Unicode and PB 9 being Ansi.

Share
10 |10000 characters needed characters left characters exceeded
René Ullrich Oct 21, 2016 at 06:15 AM
0

Yes, encoding may be the reason.

The Blob() function has an optional second parameter to specify the encoding. Default is EncodingUTF16LE!. It may be your ASP service may not handle the encoding or the specified Content-Length (ll_length) is not correct because of the different encoding.

Try Blob ("...", EncodingAnsi!)

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 21, 2016 at 03:47 PM
0

Roland and René, thanks for your help , this worked. Andrés

Share
10 |10000 characters needed characters left characters exceeded