I'm using oracle 19c database character set AR8MSWIN1256 ON WINDOWS I have used UTL_HTTP to get a soap response but I am getting invalid characters also i have switched to AMERICAN_AMERICA.AL32UTF8on another database but with no luck im getting the following
?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><xrsi:h2h-das-reply xmlns:xrsi="http://www.westernunion.com/schema/xrsi"><MTML><REPLY HOST="AUHOST" CLIENT="WUCLIENT"
TYPE=""><DATA_CONTEXT><HEADER><ACCOUNT_NUM>AJX129993</ACCOUNT_NUM><DATA_MORE>N</DATA_MORE><DATA_NUM_RECS>56</DATA_NUM_RECS><NAME>GetStateList</NAME><FSID>WGHHJOI390T</FSID><COUNTER_ID>JOI39ARP001D</COUNTER_ID><TERM_ID>WAQt</TERM_ID></HEADER><RECORDSET><GETSTATELIST><STATE_CODE>AL</SaR?EA9????????AB{q?kJt4
??/Bh??Y???p????^?H?4%??p????d?mY;J?g?????w?<??@?????7?kQ???$???h+?zpS????{~*????o8/9?????p#?IK?8e?S?8?a????????+?k@???H???#???_??}U???W)????I??s^ .?"?`????M??????? ?ZsS?>?c??????[?0[?G[??4???s/%}?vi*9?$~????0?????l?d???????LFF"???????_A?F-Qs%??
here is my plsql code
declare
url varchar2(2000):='https://wugateway2pi.westernunion.net';
body varchar2(32000):='
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xrsi="http://www.westernunion.com/schema/xrsi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/><soapenv:Body><xrsi:h2h-das-request><channel><type>H2H</type><name>abc</name>
<version>141</version></channel><foreign_remote_system><identifier>xyz</identifier>
<reference_no>1213</reference_no><counter_id>xyz</counter_id>
</foreign_remote_system><name>GetStateList</name><filters><queryfilter1>en</queryfilter1>
<queryfilter2>US</queryfilter2></filters></xrsi:h2h-das-request></soapenv:Body></soapenv:Envelope>';
req UTL_HTTP.REQ;
resp UTL_HTTP.RESP;
myclob clob;
buff varchar2(32767);
begin
UTL_HTTP.set_wallet('file:D:\wallet',null);
utl_http.SET_BODY_CHARSET('utf-8');
UTL_HTTP.SET_TRANSFER_TIMEOUT(120);
req:= UTL_HTTP.BEGIN_REQUEST(url, 'POST');
UTL_HTTP.SET_HEADER (req,'Content-Type','text/xml;chartset=utf-8');
UTL_HTTP.SET_HEADER (req,'Content-Length',lengthb(body))
UTL_HTTP.WRITE_TEXT (req,body);
resp:=UTL_HTTP.GET_RESPONSE(req);
-----------
DBMS_LOB.createtemporary(myclob, FALSE);
BEGIN
LOOP
UTL_HTTP.READ_TEXT(resp, buff, 1000);
dbms_output.put_line(buff);
DBMS_LOB.WRITEAPPEND(myclob, length(buff), buff);
END LOOP;
UTL_HTTP.END_RESPONSE(resp);
EXCEPTION
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.END_RESPONSE(resp);
END;
dbms_output.put_line(myclob);
DBMS_LOB.freetemporary(myclob);
end;
/
i have also tried the following
l_text:=convert(l_text,'AR8MSWIN1256','AL32UTF8');
also have tried
I tried to set the header :
utl_http.set_header(http_req, 'Content-Type', 'text/xml; charset=utf-8');
utl_http.set_header(http_req, 'Content-Type', 'application/xml; charset=utf-8');
utl_http.set_header(http_req, 'Content-Type', 'application/soap+xml;charset=UTF-8');
utl_http.set_header(http_req, 'Content-Type', 'text/xml');
but with no luck at all, how to fix this issue?
is it possible to be a matter of decryption erorrs becuase this site uses a mutual authentication and using a private key ?
0 Answer(s)