WS-Security PL/SQL Forms


Posted on 16th Feb 2014 07:03 pm by admin

Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
PL/SQL Release 10.2.0.2.0 - Production
Forms 32 Bit Version 10.1.2.0.2 (Production)

Hello,

I have an application in Forms (web mode). That application must now use a web service.
I therefore develop a procedure called this service and it works fine using HTTPS (Web Service Test on https).
The problem is that now I must touch on the same web service that has been secure with WS-Security.
How do I add headers security, sign the message ... .

All ideas are welcome.

Thank you beforehand.

For those interested, here's the code:
(Warning, this is only a test, no param, ... , but the ultimate goal is to call this procedure in Forms).

CREATE OR REPLACE procedure test_ws_fedict
IS
http_req utl_http.req;
http_resp utl_http.resp;
request_env varchar2(32767) DEFAULT NULL;
response_env varchar2(32767) DEFAULT NULL;
begin
UTL_HTTP.SET_DETAILED_EXCP_SUPPORT(TRUE);
-- Set proxy details if no direct net connection.
UTL_HTTP.set_proxy('http://:@10.0.2.21:8070', NULL);
UTL_HTTP.set_persistent_conn_support(TRUE);
request_env:=''
||'Ceci est un test accent "
';
dbms_output.put_line('Length of Request:' || length(request_env));
dbms_output.put_line ('Request: ' || request_env);
UTL_HTTP.set_wallet ('file:/Orasoftware/Oracle_wallet',);
http_req := utl_http.begin_request('https://fsb.services.int.belgium.be/1.00/CPS_SecuredEchoService','POST', utl_http.HTTP_VERSION_1_1);

utl_http.set_header(http_req, 'Content-Type', 'text/xml; charset=utf-8');
utl_http.set_header(http_req, 'Content-Length', length(request_env));
utl_http.set_header(http_req, 'SOAPAction', '"Echo"');
utl_http.write_text(http_req, request_env);
dbms_output.put_line('');
http_resp := utl_http.get_response(http_req);
dbms_output.put_line('Response Received');
dbms_output.put_line('--------------------------');
dbms_output.put_line ( 'Status code: ' || http_resp.status_code );
dbms_output.put_line ( 'Reason phrase: ' || http_resp.reason_phrase );
utl_http.read_text(http_resp, response_env);
dbms_output.put_line('Response: ');
dbms_output.put_line(response_env);
utl_http.end_response(http_resp);
EXCEPTION
when others then
DBMS_OUTPUT.put_line('Sqlerrm');
DBMS_OUTPUT.put_line(sqlerrm);
DBMS_OUTPUT.put_line('SqlCode');
DBMS_OUTPUT.put_line(sqlcode);
DBMS_OUTPUT.put_line('UTL_HTTP.get_detailed_sqlerrm')
DBMS_OUTPUT.put_line(UTL_HTTP.get_detailed_sqlerrm);
end test_ws_fedict;

No comments posted yet

Your Answer:

Login to answer
196 Like 38 Dislike
Previous forums Next forums
Other forums

sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is somet

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

Is it possible to stop reservation creation in PM Order?
Hi All,

Is it possible to stop reservation creation in PM Order?

Thanks in adv

Retrieving Data from Two Different Databases
Hello All,

Ran into another problem and would appreciate some help! I have two datab

Sort Alternative/bi-monthly
Hi all,

Am going mad trying to get something to work.

I'm creating a CMS for a magazi

Date Format
Hi there,

I have a date format like this right now:
Sat, 17 Oct 2009 17:04:00

I ne

Please help with SMTP Authenticated PHP Email Form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat

ok i need to join all this pages to make 1 neat code
i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Generating unique numbers using php
Hi,
I need help in generating unique number using php.I tired using rand() in php.But, by using r

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash