declare l_envelope CLOB; l_xmltype XMLTYPE; l_response varchar2(100); ecode NUMBER; emesg VARCHAR2(200); cursor searchresults_cur(p_xmltype xmltype) is SELECT extractvalue(column_value, '/idc:SearchResults/idc:dDocName','xmlns:idc="http://www.stellent.com/Search/"') DOCNAME, extractvalue(column_value, '/idc:SearchResults/idc:dDocTitle','xmlns:idc="http://www.stellent.com/Search/"') DOCTITLE FROM TABLE(XMLSequence(p_xmltype.extract('//idc:QuickSearchResponse/idc:QuickSearchResult/idc:SearchResults','xmlns:idc="http://www.stellent.com/Search/"'))); searchresults_rec searchresults_cur%ROWTYPE; begin l_envelope := ''; l_envelope := l_envelope || ''; l_envelope := l_envelope || ' '; l_envelope := l_envelope || ' '; l_envelope := l_envelope || ' '; l_envelope := l_envelope || ' dDocAuthor <matches> `test`'; l_envelope := l_envelope || ' '; l_envelope := l_envelope || ' '; l_envelope := l_envelope || ''; -- dbms_output.put_line('(soapenv)='||l_envelope); l_xmltype := flex_ws_api.make_request( p_url => 'https://server.domain.com/_dav/cs/idcplg', p_action => 'http://www.stellent.com/Search/', p_envelope => l_envelope, p_username => 'adminuser', p_password => 'password', p_wallet_path => 'file:/u01/app/oracle/admin/SID/wallet', p_wallet_pwd => 'walletpassword' ); -- dbms_output.put_line('(xml)='||substr(l_xmltype.GetClobVal(),1,2000)); open searchresults_cur(l_xmltype); loop fetch searchresults_cur into searchresults_rec; exit when searchresults_cur%NOTFOUND; dbms_output.put_line('(dDocName)='||searchresults_rec.DOCNAME||' (dDocTitle)='||searchresults_rec.DOCTITLE); end loop; if searchresults_cur%ROWCOUNT = 0 then dbms_output.put_line('No records found!'); end if; close searchresults_cur; exception when others then ecode := SQLCODE; emesg := SQLERRM; --insert into log_table (code,message,info) values (0,TO_CHAR(ecode) || '-' || emesg,'apex_ucm.CheckinDocument emesg'); --commit; raise; end; /