2024年最全Oracle通过存储过程 采用HTTP的方式调用webserivce,【一篇文章搞懂

结尾

正式学习前端大概 3 年多了,很早就想整理这个书单了,因为常常会有朋友问,前端该如何学习,学习前端该看哪些书,我就讲讲我学习的道路中看的一些书,虽然整理的书不多,但是每一本都是那种看一本就秒不绝口的感觉。

以下大部分是我看过的,或者说身边的人推荐的书籍,每一本我都有些相关的推荐语,如果你有看到更好的书欢迎推荐呀。

开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

前端学习书籍导图-1

http_resp := utl_http.get_response(http_req);

utl_http.read_text(http_resp, env);

utl_http.end_response(http_resp);

return_value := xmltype.createxml(env)

.extract(‘/soap:Envelope/soap:Body/child::node()’,

‘xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”’);

error_value := return_value.extract(‘/soap:Fault’,

‘xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”’);

if (error_value is not null) THEN

error_string := error_value.extract(‘/soap:Fault/faultstring/child::text()’,‘xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”’)

.getstringval();

error_code := error_value.extract(‘/soap:Fault/faultcode/child::text()’,‘xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”’)

.getstringval();

raise_application_error(-20000,

'error in authentification: ’ || error_string ||

’ - ’ || error_code);

end if;

result_string := return_value.getStringVal();

dbms_output.put_line(result_string);

/*

result_string := replace(result_string, ‘<’, ‘<’);

result_string := replace(result_string, ‘>’, ‘>’);

result_string := replace(result_string, ‘"’, ‘"’);*/

–return result_string;

end httpwebservice2;

/

例子2


DECLARE

L_PARAM_LIST VARCHAR2(32767);

L_HTTP_REQUEST UTL_HTTP.REQ;

L_HTTP_RESPONSE UTL_HTTP.RESP;

L_RESPONSE_TEXT VARCHAR2(32767);

BEGIN

–452501195312120215|张昌义|K10131759|1

– service’s input parameters

L_PARAM_LIST := '<soapenv:Envelope xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:ser=“http://server.webservice.simis.si.neusoft.com”>

soapenv:Header/

soapenv:Body

<ser:ReportTheLossOfSIcard soapenv:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>

452501195312120215|张昌义|K10131759|1

</ser:ReportTheLossOfSIcard>

</soapenv:Body>

</soapenv:Envelope>';

– preparing Request…

L_HTTP_REQUEST := UTL_HTTP.BEGIN_REQUEST(‘http://10.154.232.38:9001/eapdomain_lz/services/WSInterfaceSiINF?wsdl’,

‘POST’,

‘HTTP/1.1’);

– …set header’s attributes

UTL_HTTP.SET_HEADER(L_HTTP_REQUEST,

‘Accept-Encoding’,

‘gzip,deflate’);

– …set header’s attributes

UTL_HTTP.SET_HEADER(L_HTTP_REQUEST,

‘Connection’,

‘Keep-Alive’);

UTL_HTTP.SET_HEADER(L_HTTP_REQUEST,

‘User-Agent’,

‘Apache-HttpClient/4.1.1’);

UTL_HTTP.SET_HEADER(L_HTTP_REQUEST,

‘Content-Type’,

‘text/xml; charset=UTF-8’);

UTL_HTTP.SET_HEADER(L_HTTP_REQUEST,

‘Content-Length’,

‘544’);-- LENGTH(L_PARAM_LIST));

UTL_HTTP. set_header(L_HTTP_REQUEST,

‘SOAPAction’,

‘ReportTheLossOfSIcard’);

– …set input parameters

UTL_HTTP.WRITE_TEXT(L_HTTP_REQUEST, L_PARAM_LIST);

– get Response and obtain received value

L_HTTP_RESPONSE := UTL_HTTP.GET_RESPONSE(L_HTTP_REQUEST);

UTL_HTTP.READ_TEXT(L_HTTP_RESPONSE, L_RESPONSE_TEXT);

DBMS_OUTPUT.PUT_LINE(L_RESPONSE_TEXT);

– finalizing

UTL_HTTP.END_RESPONSE(L_HTTP_RESPONSE);

EXCEPTION

WHEN UTL_HTTP.END_OF_BODY THEN

UTL_HTTP.END_RESPONSE(L_HTTP_RESPONSE);

END;

例子3


DECLARE

L_PARAM_LIST VARCHAR2(32767);

L_HTTP_REQUEST UTL_HTTP.REQ;

L_HTTP_RESPONSE UTL_HTTP.RESP;

L_RESPONSE_TEXT VARCHAR2(32767);

BEGIN

– service’s input parameters

L_PARAM_LIST := '<soapenv:Envelope xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:ser=“http://server.webservice.simis.si.neusoft.com”>

soapenv:Header/

soapenv:Body

最后

前端CSS面试题文档,JavaScript面试题文档,Vue面试题文档,大厂面试题文档

开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

Header/>

soapenv:Body

最后

前端CSS面试题文档,JavaScript面试题文档,Vue面试题文档,大厂面试题文档

开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

[外链图片转存中…(img-mmpwHcVC-1715040531810)]

[外链图片转存中…(img-eIIM7Z8P-1715040531810)]

  • 29
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值