[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Http_Url_Post_Xml exclude CR/LF characters in CDATA description



Sender: Michel JOANIQUET <mjoaniquet@xxxxxxx>

Hello all,

My url is containing Carriage Return and LineFeed characters that I might use in my application.

When I use Http_Url_Post, the file returned is OK, includind CR/LF characters (x'0a' in hexadecimal code). But, when I want to parse this url with Http_Url_Post_Xml, the data included in CDATA is returned without x'0a'.

Can you please give me your opinion ?

Thanks




Here is the code I used :


.../...
Enc = http_url_encoder_new ; // Encodage de la demande
http_url_encoder_addvar_s( Enc : 'source' : 'TAC' ); http_url_encoder_addvar_s( Enc : 'action' : 'CRT_TRAFFIC' ); http_url_encoder_addvar_s( Enc : 'session' : %trim(IDConnection) );


http_url_encoder_addvar_s( Enc : 'action' : 'CRT_TRAFFIC' ); http_url_encoder_addvar_s( Enc : 'session' : %trim(IDConnection) ); http_url_encoder_addvar_s( Enc : 'param' : %trim(zz_command) ); http_url_encoder_getptr (Enc : myPointer : dataSize );
url = 'http://172.20.10.80/apixml/appel_amadeus.php?' + http_url_encoder_getstr(Enc); Clear PostData ; rc = http_url_post ( url // URL de requête : %addr(postData) : %len(postData) : '/tmp/testamadeus.txt' // Fichier retourné : 20 // Nbre de secondes avant timeout
) ; PostData = http_url_encoder_getstr(Enc) ; zz_dialog = *ALLx'00'; rc = http_url_post_xml ( url // URL de requête GET : %addr(postData) : %len(postData) : *NULL // Procédure avant récupération
: %paddr(EndProc) // Procédure après récupération
: %addr(ww_dialog) // Donnée retournée : 20 // Nbre de secondes avant timeout : 'HTTP/1.0' // User Agent : 'text/plain' // Content Type : '' // Soap Action ) ; callp http_url_encoder_free(Enc) ; // Libération du pointeur d'encodage




Data received using http_url_post :
... 48 20 32 37 4a 55 4c 20 30 30 30 30 0a 20 31 20    H 27JUL 0000* 1  ...


Data received using http_url_post_xml : ...40 F2 F7 D1 E4 D3 40 F0 F0 F0 F0 40 F1 40 40 40 27JUL 0000 1 ... ----------------------------------------------------------------------- This is the FTPAPI mailing list. To unsubsribe from the list send mail to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr -----------------------------------------------------------------------