A couple days ago i created simple package for HTTPS/HTTP, but I’ve decided now to improve it:
- Timeout parameter – it would be better to control connection time;
- Simple page parsing with PCRE regular expressions – to speed up and simplify page parsing, because if you want to get big number matched expressions from CLOB with regexp_xxx oracle functions, you have to call these functions many times with different [occurance] parameters, passing/accessing to the clob many times. But within java procedure it will be just one pass.
- Support of plsqldoc – the tool for automatically generating documentation in HTML format.(javadoc analogue)
Upd 2015-10-11:
- added HttpMethod parameter – so you can choose POST or GET method
- added function get_last_response – returns last HTTP response code.
You can download new version from github: https://github.com/xtender/xt_http
Also it may be interesting if you want to see how to get collection of CLOBs/varchar2 from JAVA stored procedure.
So with new functions I can even more easy get UpVoters list from prevous post:
select * from table( xt_http.get_matches( pUrl => '&url' ,pPattern => 'alt="([^"]+)"' ,pGroup => 1 ) ) t
Results
select * from table( xt_http.get_matches( pUrl => '&url' ,pPattern => 'alt="([^"]+)"' ,pGroup => 1 ) ) t / Enter value for url: https://community.oracle.com/voting-history.jspa?ideaID=6901&start=0&numResults=1000 NAME -------------------------------------------------- Denes Kubicek Pavel Luzanov Martin Preiss AlexAA scherbak TimHall Toon Koppelaars Dom Brooks mweedman BluShadow Dmitry-Oracle Mahir M. Quluzade SA2 Dmitry A. Bogomolov SQL*Plus Alexander.Ryndin-Oracle Mohamed Houri Randolf Geist ctrieb UltraBlast Kot Dmitriy user9506228 Timur Akhmadeev Franck Pachot pudge user12068799 user11933056 user11994768 iRAV user12228999 nicher100 vva Alexander Semenov Dmitry_Nikiforov Bud Light user7111641 dbms_photoshop AcidMan achervov GokhanAtil user2616810 Harun Kucuksabanoglu _Nikotin Maki user9066618 user10487079 IgorUsoltsev edw_otn Vigneswar Battu user11198823 be here now 869219 user7543311 VladimirSitnikov kamineff Asmodeus djeday84 Oleh Tyshchenko 87Rb-87Sr 911978 KoTTT Konstantin 945154 953255 user12217223 Alexander_Anokhin-Oracle oragraf.sql Jack10154746 user9502569 Yury Pudovchenko Sergey Navrotskiy 985277 xifos MatthiasRogel Mikhail Velikikh user12134743 1025067 Oren Nakdimon 1051964 1094595 1209426 user11211533 user6115180 user3990689 d.nemolchev user8925862 user11222376 user882251 user12279047 1284785 1323138 1336159 Grigory-OC 1373320 1373354 1411786 1421824 user13287062 1442254 1443436 1447180 KSDaemon user12097700 Sergei Perminov user3539222 Victor Osolovskiy 1560322 user13609377 user6672754 Alfredo Abate user11315510 user12245839 1636030 user5399907 user3983717 user12276855 1744386 user9171605 ksAsmodeus user12058508 1856219 user3214869 Trihin Pavel 1879578 1886567 user8869337 1890583 1913344 user11978061 user1438531 Menno Hoogendijk 2616420 2646629 rpc1 user4770257 user5217858 user11949728 al.netrusov 2693742 AKalugin 2721788 RZGiampaoli 2728073 2769955 2786798 2789541 BobDJ 2816036 user10123230 2831055 DBA_Hans_007 2880604 2896072 2902504 ApInvent Pinto Das natalka 2913706 2924025 2957186 2960288 -KE- user5337688 3001391 3004351 oleksii.kondratenko zeynep.samsa Mehmet Kaplan adbee6ae-dcb4-4c59-915b-487b33773a3f 6648e909-359d-4a32-b7bd-6cea3fd9fec3 mehmetyalcin 60e3f71b-bd5d-422c-b479-7a087d5b3827 3032511 c09042fd-15da-494b-b7b0-243ff4ceeb4b 5e087e18-4789-4923-92cb-cce149ba3072 5291adcf-242b-4f01-bbe6-b7ce44db1aac 9c0321bf-a358-49f9-88e4-462bd4fd5674 03b9266b-53f4-4503-ae04-b339c039bffd user12044736 4a89f5a6-cc35-424e-8e3c-59964ad8d56b 54113fd4-6592-4a32-9920-663813bdd4c5 590d4b9f-32b6-43ad-b0c4-3b767407c055 ffb03087-d390-4068-98e5-4cfd73e66d00 3fa47a10-7b28-4857-9274-d175f3b7fd48 user5814569 d0b20163-7a58-4d4d-9a7d-01ec973bc3e1 8aaa1ed8-e0f6-4712-bef7-6b1e6579798f 1aee554c-832b-4fa5-bead-0680a53d1cc5 5daa756f-80aa-4260-b91d-10d2c51b78d6 e7897e6a-993d-46db-ad93-215b61b715ad 9f982eda-2b58-4d61-aad9-4c6a50d2dab7 user2503867 3032876 f3012cfb-62b5-4c86-a102-2172c3640d5b 68fe6d1e-d41c-4528-b076-ac3bc5289cc5 41232c56-5a29-442c-a1c6-d5b94477be1d 0682b6e1-8662-498c-8455-629032a25cea user6592033 59961cb1-b4a6-470c-9802-44432911a7ff user7345691 ab7980ce-71ba-4ec1-a578-6b716f2ae1ae user5844404 723b639c-f6c6-4780-8ad6-0315564ef937 28e651f6-c9c3-4d2a-af03-001837eb99ba 3032942 841b96b4-ab84-461e-aed9-58f9df710406 user9961876 d7e48e5c-868f-4b2d-88b5-8614e9d35c80 3033022 f095cbb6-707a-4f40-8f18-a6a9dc37894d 3033091 9e9d3c99-9b5e-4fa2-89ac-4e6216209566 a9e702d3-f8e5-43ee-8e6c-0fe722d9ab50 bdd07d60-c467-4115-8149-8ef2af880d9a d5571104-4726-4f06-b529-293dc667ae6e user10865764 petrelevich 87a6503f-5717-4887-ac77-cd916002f53a user7355088 user6083916 user2300447 user12299863 81ddc21a-7cb3-4298-a96b-ea7c9774b2c4 3405d13c-9d19-4903-8eb0-14a2544cb32b user2427414 4670adeb-1c9d-4ce4-98eb-962bc4c68f5d oldhook 1e4428aa-3a63-4a1a-90b3-f2b74292f502 user6367919 7c75e315-487d-4797-8e5b-f3dee58bbc79 user8828289 1a8ad4e7-759f-48ee-8054-c449540d0573 6f3b1262-c9d6-42d6-b703-fc4e6a40b7a1 037f209b-f643-4642-a059-79988d19d77b PL99 3034106 3034166 user5489918 user2340616 naeel maqsudov 3036157 user2626322 52e8d732-4289-4d0d-b8c5-80e701f3c07d 4b2deedd-84c4-4b8b-8724-837c54dd764e user12569643 07292d40-2bab-4e94-b68e-cfaae6c093a8 8ec394ac-fd54-4896-9810-0381bb75260e caec3a42-0f98-440b-ad71-9522cb1e0a0e 9c52d45b-e2e4-489c-9a32-548c77f159b3 f6e966be-8576-4da9-a0df-8fec374b6cd3 5214be2e-d761-4a4e-aeba-23ff7bb4cf4e f070b484-017d-4d4c-a740-f6ad9db37286 d4f322d3-0265-458d-948d-83bd66d5c7e3
[collapse]