Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Consuming SAP PI webservice in oracle PL/SQL stored procedure

$
0
0

Hi  Experts,

 

We have a requirement of consuming sap pi webservice in a oracle stored procedure. Once the PI webservice is generated how can we consume this webservice in a oracle stored procedure. I am using UTL_DBWS and UTL_HTTP package in oracle to consume the PI webservice.

 

Please see the sample oracle stored procedure for consuming PI  webservice.

 

create or replace PROCEDURE P_WEBSERVICE AS

 

  req   utl_http.req;

  resp  utl_http.resp;

  value VARCHAR2(1024);

 

BEGIN

 

  req := utl_http.begin_request('http://piprd:70000/dir/wsdl?p=sa/7ac366e8a93a3dca97dca07cf339a612');

  IF (username IS NOT NULL) THEN

    utl_http.set_authentication(req, 'userid', 'password'); -- Use HTTP Basic Authen. Scheme

  END IF;

  utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');

  resp := utl_http.get_response(req);

 

  utl_http.http_response_error_check(FALSE);

 

 

 

 

  LOOP

    utl_http.read_line(resp, value, TRUE);

    dbms_output.put_line(value);

  END LOOP;

  utl_http.end_response(resp);

EXCEPTION

  WHEN utl_http.end_of_body THEN

    utl_http.end_response(resp);

   

END P_WEBSERVICE;

 

I am unable to call the PI webservice using the above stored procedure.

 

Please suggest how can we achieve it.

 

Thanks,

Neeraj


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>