Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Using ORACLE to call https interface to realize Json message and Json object parsing

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Project background: in the recent project, we need to call the other company's api to parse json messages and return json objects. In the previous project, we docked some http interfaces (json and x-www-form-urlencoded), and this time covered the formal environment after testing in the local environment (RedHat 7.5 + 11g 11.2.0.4). It takes less than 6 hours to receive the test and data validation. 1. Create Oracle wallet and import trust certificate. Create a directory mkdir wallet 2. 0 in u01/app/oracle. New wallet orapki wallet create-wallet/ home/oracle/wallet/-pwd orapassword 3. Upload the security certificate to the wallet directory export method: use a browser to open the website and export two certificates, and choose the DER code 4. Import the trusted https security certificate orapki wallet add-wallet/ home/oracle/wallet/-trusted_cert-cert / home/oracle/wallet/***.cer 2, create an oracle acl and assign it to the specified user, and specify the network access address and port for the user (SYS users can skip it) 3. Write https call function 1. Add UTL_HTTP.set_wallet ('file:/home/oracle/wallet',' password) after the block is executed; otherwise, the ORA-20204 certificate error will still be reported when calling 4. Write a function to transfer the string to the json object and use Postman to verify the message. 5. Write the stored procedure, use the cursor to get the required message data, and record the return data, parse JSON because the object to be parsed does not have multiple arrays, so the pljson packet is not used this time

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report