Hi experts,
I have written following code to call report using apex_web_service but it is showing error. Please help me.
declare
l_envelope CLOB;
l_xml XMLTYPE;
l_result VARCHAR2(32767);
BEGIN
l_envelope:='<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<pub:runReport>
<pub:reportRequest>
<pub:reportAbsolutePath>/Custom/Supply Chain Management/Wholesale Process/Business Unit Name Report.xdo</pub:reportAbsolutePath>
<pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>
</pub:reportRequest>
<pub:appParams/>
</pub:runReport>
</soap:Body>
</soap:Envelope>';
dbms_output.put_line('Request');
l_xml:=apex_web_service.make_request(
p_url => 'https://xyz.com/xmlpserver/services/ExternalReportWSSService',
p_action => '',
p_envelope => l_envelope,
p_username => 'username',
p_password => 'password' );
dbms_output.put_line('Request has been submitted'||chr(10)||l_xml.getStringVal());
/*l_result := APEX_WEB_SERVICE.parse_xml(
p_xml => l_xml,
p_xpath => '//return/text()',
p_ns => 'xmlns="http://schemas.xmlsoap.org/soap/envelope/"'
);*/
END;
/
Output/Error:
Request
Request has been submitted
<?xml version='1.0' encoding='UTF-8'?><err><sqlerrm>ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00229: input source is empty</sqlerrm><response><![CDATA[]]></response></err>