633: soap_respond varchar2(30000);
634: l_proxy_server VARCHAR2(100) := fnd_profile.value('MTH_SOA_PROXY_SERVER');
635: --l_proxy_server VARCHAR2(100) := 'www-proxy.us.oracle.com';
636: l_action VARCHAR2(100);
637: http_req utl_http.req;
638: http_resp utl_http.resp;
639: launch_url varchar2(240) ;
640: l_returned_status varchar2(1024);
641: l_from NUMBER;
634: l_proxy_server VARCHAR2(100) := fnd_profile.value('MTH_SOA_PROXY_SERVER');
635: --l_proxy_server VARCHAR2(100) := 'www-proxy.us.oracle.com';
636: l_action VARCHAR2(100);
637: http_req utl_http.req;
638: http_resp utl_http.resp;
639: launch_url varchar2(240) ;
640: l_returned_status varchar2(1024);
641: l_from NUMBER;
642: l_end NUMBER;
646: IF l_proxy_server IS NULL THEN
647: RETURN 'Failed to process BPEL due to no proxy server setting.';
648: END IF;
649:
650: UTL_HTTP.set_proxy(l_proxy_server, NULL);
651: --UTL_HTTP.set_persistent_conn_support(TRUE);
652:
653: soap_request:= '
654:
647: RETURN 'Failed to process BPEL due to no proxy server setting.';
648: END IF;
649:
650: UTL_HTTP.set_proxy(l_proxy_server, NULL);
651: --UTL_HTTP.set_persistent_conn_support(TRUE);
652:
653: soap_request:= '
654:
655:
656:
657: '
658: '
659:
660: http_req:= utl_http.begin_request(p_url,'POST','HTTP/1.0');
661: utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
662: utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
663:
664: --utl_http.set_header(http_req, 'SOAPAction', 'initiate');
657: '
658: '';
659:
660: http_req:= utl_http.begin_request(p_url,'POST','HTTP/1.0');
661: utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
662: utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
663:
664: --utl_http.set_header(http_req, 'SOAPAction', 'initiate');
665: utl_http.set_header(http_req, 'SOAPAction', p_action);
658: '';
659:
660: http_req:= utl_http.begin_request(p_url,'POST','HTTP/1.0');
661: utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
662: utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
663:
664: --utl_http.set_header(http_req, 'SOAPAction', 'initiate');
665: utl_http.set_header(http_req, 'SOAPAction', p_action);
666: utl_http.write_text(http_req, soap_request) ;
660: http_req:= utl_http.begin_request(p_url,'POST','HTTP/1.0');
661: utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
662: utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
663:
664: --utl_http.set_header(http_req, 'SOAPAction', 'initiate');
665: utl_http.set_header(http_req, 'SOAPAction', p_action);
666: utl_http.write_text(http_req, soap_request) ;
667: http_resp:= utl_http.get_response(http_req) ;
668: utl_http.read_text(http_resp, soap_respond) ;
661: utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
662: utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
663:
664: --utl_http.set_header(http_req, 'SOAPAction', 'initiate');
665: utl_http.set_header(http_req, 'SOAPAction', p_action);
666: utl_http.write_text(http_req, soap_request) ;
667: http_resp:= utl_http.get_response(http_req) ;
668: utl_http.read_text(http_resp, soap_respond) ;
669: utl_http.end_response(http_resp) ;
662: utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
663:
664: --utl_http.set_header(http_req, 'SOAPAction', 'initiate');
665: utl_http.set_header(http_req, 'SOAPAction', p_action);
666: utl_http.write_text(http_req, soap_request) ;
667: http_resp:= utl_http.get_response(http_req) ;
668: utl_http.read_text(http_resp, soap_respond) ;
669: utl_http.end_response(http_resp) ;
670:
663:
664: --utl_http.set_header(http_req, 'SOAPAction', 'initiate');
665: utl_http.set_header(http_req, 'SOAPAction', p_action);
666: utl_http.write_text(http_req, soap_request) ;
667: http_resp:= utl_http.get_response(http_req) ;
668: utl_http.read_text(http_resp, soap_respond) ;
669: utl_http.end_response(http_resp) ;
670:
671: soap_respond := REPLACE(soap_respond,' ','');
664: --utl_http.set_header(http_req, 'SOAPAction', 'initiate');
665: utl_http.set_header(http_req, 'SOAPAction', p_action);
666: utl_http.write_text(http_req, soap_request) ;
667: http_resp:= utl_http.get_response(http_req) ;
668: utl_http.read_text(http_resp, soap_respond) ;
669: utl_http.end_response(http_resp) ;
670:
671: soap_respond := REPLACE(soap_respond,' ','');
672:
665: utl_http.set_header(http_req, 'SOAPAction', p_action);
666: utl_http.write_text(http_req, soap_request) ;
667: http_resp:= utl_http.get_response(http_req) ;
668: utl_http.read_text(http_resp, soap_respond) ;
669: utl_http.end_response(http_resp) ;
670:
671: soap_respond := REPLACE(soap_respond,' ','');
672:
673: l_from := InStr(SubStr(soap_respond, instr (soap_respond, '
681:
682: RETURN l_returned_status;
683:
684: EXCEPTION
685: WHEN UTL_HTTP.INIT_FAILED THEN
686: RETURN 'Initialization of the HTTP-callout subsystem fails.';
687: WHEN UTL_HTTP.REQUEST_FAILED THEN
688: RETURN 'The HTTP call fails due to Network problem.';
689: WHEN OTHERS THEN
683:
684: EXCEPTION
685: WHEN UTL_HTTP.INIT_FAILED THEN
686: RETURN 'Initialization of the HTTP-callout subsystem fails.';
687: WHEN UTL_HTTP.REQUEST_FAILED THEN
688: RETURN 'The HTTP call fails due to Network problem.';
689: WHEN OTHERS THEN
690: RETURN 'Failed to process HTTP Request due to Other errors occurs.';
691: