Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How I can Solve the problem soap version soap 1.2 is not compatable with Content type text/xml?

User_XRBY6Apr 25 2021 — edited Apr 26 2021

Error Message Appear in oracle apex Pl/sql code As the following
declare
l_envelope CLOB;
l_xml XMLTYPE;
BEGIN
l_envelope:= '
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<soap:Header/>
<soap:Body>
<pub:runReport>
<pub:reportRequest>
<pub:reportAbsolutePath>/Custom/Amr_Test_Report.xdo</pub:reportAbsolutePath>
<pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>
</pub:reportRequest>
</pub:runReport>
</soap:Body>
</soap:Envelope>';

-- Content-Type application/soap+xml; charset=UTF-8;action=""
apex_debug.message('DEBUGMSG: before the web service call');
begin
-- APEX_WEB_SERVICE.g_request_headers.delete();
-- APEX_WEB_SERVICE.g_request_headers(1).name := 'Content-Type';
-- APEX_WEB_SERVICE.g_request_headers(1).value := 'application/soap+xml; charset=UTF-8"';
-- DBMS_OUTPUT.put_line('name: ' || APEX_WEB_SERVICE.g_request_headers(1).name);
-- DBMS_OUTPUT.put_line('value: ' || APEX_WEB_SERVICE.g_request_headers(1).value);

l_xml:=apex_web_service.make_request(
p_url => 'https://ejns-test.fa.us6.oraclecloud.com:443/xmlpserver/services/ExternalReportWSSService',
p_envelope => l_envelope,
p_username => 'm.mahmoud',
p_password => '12345678910');
exception when others then
apex_debug.message('DEBUGMSG: webservice call failed');
for i in 1.. apex_web_service.g_headers.count loop
apex_debug.message('DEBUGMSG: response header name: %s, response header value: %s',apex_web_service.g_headers(i).name,apex_web_service.g_headers(i).value);
end loop;
end;

dbms_output.put_line('Request has been submitted'||chr(10)||l_xml.getStringVal());
exception
when others then
dbms_output.put_line(SQLERRM);
END;

Comments
Post Details
Added on Apr 25 2021
2 comments
4,766 views