URGENT: Content Services using PL/sql utl_http

I'm using Oracle Collaboration Suite Content Services Version 10.1.2.0.0 (Oracle 10g Enterprise Edition Release 10.1.0.4.0).
Using PL/sql, I want to be able to retrieve a html document stored in a folder in Content Services, and store the contents of that document in a table.
I can retrieve and store the contents of the document if it stored anywhere - I just can't when the document resides in Content Services.
Within PL/sql I am authenticating using utl_http.set_authentication, then using utl_http.request_pieces.
I'm not getting an error message, just the "<" character stored in my table.
Can I not use utl_http.request_pieces for retrieving a document in Content Services?
Thanks
Paul

HI Michiel
I am also trying to achieve something similar to that. I am trying to call a web service that sends an xml attachment over MTOM? Kindly, let me know if this was achievable from your end? I mean how did the issue got resolved.
thanks
vijay

Similar Messages

  • Error invoking SSL web service using pl sql UTL_HTTP

    Web Services Gurus,
    I am invoking a secure web service based on the following WSDL file from a pl/sql program using UTL_HTTP package.
    The web service is secure and prompts for authentication.
    The web services certificate is imported in Oracle Wallet on Database Server.
    I am listing the WSDL file, the pl/sql code and error message as follows -
    1. The WSDL file -
    <definitions
    name="Webservice"
    targetNamespace="http://webservice.airclic.com/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://webservice.airclic.com/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <types>
    <xs:schema targetNamespace="http://webservice.airclic.com/" version="1.0" xmlns:tns="http://webservice.airclic.com/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Exception" type="tns:Exception"/>
    <xs:element name="sendAuthenticationResponse" type="tns:sendAuthenticationResponse"/>
    <xs:element name="sendAuthenticationResponseResponse" type="tns:sendAuthenticationResponseResponse"/>
    <xs:complexType name="AuthenticationResponse">
    <xs:complexContent>
    <xs:extension base="tns:Response">
    <xs:sequence>
    <xs:element name="success" type="xs:boolean"/>
    <xs:element name="username" type="xs:string"/>
    <xs:element minOccurs="0" name="password" type="xs:string"/>
    <xs:element minOccurs="0" name="firstName" type="xs:string"/>
    <xs:element minOccurs="0" name="lastName" type="xs:string"/>
    <xs:element minOccurs="0" name="email" type="xs:string"/>
    <xs:element minOccurs="0" name="active" type="xs:boolean"/>
    <xs:element minOccurs="0" name="timeZone" type="xs:string"/>
    <xs:element minOccurs="0" name="group" type="xs:string"/>
    <xs:element minOccurs="0" name="role" type="xs:string"/>
    <xs:element minOccurs="0" name="errorCode" type="xs:string"/>
    <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="DispatchEvent"></xs:complexType>
    <xs:complexType name="sendAuthenticationResponse">
    <xs:sequence>
    <xs:element minOccurs="0" name="authenticationResponse" type="tns:AuthenticationResponse"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="sendAuthenticationResponseResponse">
    <xs:sequence/>
    </xs:complexType>
    <xs:simpleType name="status"></xs:simpleType>
    <xs:simpleType name="source"></xs:simpleType>
    <xs:simpleType name="eventType"></xs:simpleType>
    </xs:schema>
    </types>
    <message name="Webservice_sendAuthenticationResponse">
    <part name="sendAuthenticationResponse" element="tns:sendAuthenticationResponse"/>
    </message>
    <message name="Webservice_sendAuthenticationResponseResponse">
    <part name="sendAuthenticationResponseResponse" element="tns:sendAuthenticationResponseResponse"/>
    </message>
    <portType name="Webservice">
    <operation name="sendAuthenticationResponse" parameterOrder="sendAuthenticationResponse">
    <input message="tns:Webservice_sendAuthenticationResponse"/>
    <output message="tns:Webservice_sendAuthenticationResponseResponse"/>
    <fault name="Exception" message="tns:Exception"/>
    </operation>
    </portType>
    <binding name="WebserviceBinding" type="tns:Webservice">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="sendAuthenticationResponse">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    <fault name="Exception">
    <soap:fault name="Exception" use="literal"/>
    </fault>
    </operation>
    </binding>
    <service name="Webservice">
    <port name="WebservicePort" binding="tns:WebserviceBinding">
    <soap:address location="https://host.airclic.com:443/webservice/product/fieldservice/v1/Webservice"/>
    </port>
    </service>
    </definitions>
    2. The pl/sql code that calls the web service operation sendAuthenticationResponse
    procedure send_auth_response
    as
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    i integer;
    begin
    -- initiate wallet for AirClic certificate
    dbms_output.put_line ('1');
    utl_http.set_wallet('file:/etc/oracle/wallet','<wallet password>');
    -- create soap request
    dbms_output.put_line ('2');
    soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:sendAuthenticationResponse xmlns="https://host.airclic.com:443/webservice/product/fieldservice/v1/Webservice" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <success xsi:type="xsd:boolean">true</success>
    <username xsi:type="xsd:string">changlanih</username>
    <password xsi:type="xsd:string">abcd1234</password>
    <firstName xsi:type="xsd:string">hero</firstName>
    <lastName xsi:type="xsd:string">changlani</lastName>
    <email xsi:type="xsd:string">[email protected]</email>
    <active xsi:type="xsd:boolean">true</active>
    <timeZone xsi:type="xsd:string">eastern</timeZone>
    <group xsi:type="xsd:string">Northeast</group>
    <role xsi:type="xsd:string">Service Manager</role>
    <errorCode xsi:type="xsd:string"></errorCode>
    <errorMessage xsi:type="xsd:string"></errorMessage>
    </ns1:sendAuthenticationResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>';
    -- request that exceptions are raised for error Status Codes
    dbms_output.put_line ('3');
    utl_http.set_response_error_check (true);
    -- allow testing for exceptions like UTL_HTTP.http_server_error
    dbms_output.put_line ('4');
    utl_http.set_detailed_excp_support (true);
    --utl_http.set_transfer_timeout (ln_time_out);
    dbms_output.put_line ('5');
    utl_http.set_body_charset ('UTF-8');
    -- begin request
    dbms_output.put_line ('5.5');
    http_req:= utl_http.begin_request
    ('https://host.airclic.com:443/webservice/product/fieldservice/v1/Webservice/sendAuthenticationResponse', ------ is the url correct here ?
    'POST',
    'HTTP/1.1'
    dbms_output.put_line ('6');
    utl_http.set_authentication(http_req, '<username for webservice>', '<password for webservice user>');
    dbms_output.put_line ('7');
    utl_http.set_persistent_conn_support (http_req, false);
    dbms_output.put_line ('8');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
    dbms_output.put_line ('9');
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    dbms_output.put_line ('10');
    utl_http.set_header(http_req, 'SOAPAction', ''); -- required to specify this is a SOAP communication
    dbms_output.put_line ('11');
    utl_http.write_text(http_req, soap_request);
    dbms_output.put_line ('12');
    http_resp := utl_http.get_response(http_req);
    -- debug messages
    DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response---------------------');
    DBMS_OUTPUT.PUT_LINE('http_resp.status_code is :'||http_resp.status_code );
    DBMS_OUTPUT.PUT_LINE('http_resp.reason_phrase is :'||http_resp.reason_phrase);
    DBMS_OUTPUT.PUT_LINE('http_resp.http_version is :'||http_resp.http_version);
    DBMS_OUTPUT.PUT_LINE('http_resp.private_hndl is :'||http_resp.private_hndl);
    DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response----------------------');
    utl_http.read_text(http_resp, soap_respond);
    dbms_output.put_line ('13');
    utl_http.end_response(http_resp);
    dbms_output.put_line ('14');
    resp := XMLType.createXML(soap_respond);
    dbms_output.put_line ('15');
    resp := resp.extract('/soap:Envelop/soap:Body/child::node()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
    i:=0;
    dbms_output.put_line ('16');
    loop
    dbms_output.put_line(substr(soap_respond, 1 + i * 255, 250));
    i := i + 1;
    if (i * 250) > length(soap_respond) then
    exit;
    end if;
    end loop;
    exception
    when utl_http.request_failed then
    dbms_output.put_line('request failed: ' || utl_http.get_detailed_sqlerrm);
    when utl_http.http_server_error then
    dbms_output.put_line('server error: ' || utl_http.get_detailed_sqlerrm);
    when utl_http.http_client_error then
    dbms_output.put_line('client error: ' || utl_http.get_detailed_sqlerrm);
    when others then
    dbms_output.put_line(sqlerrm);
    end send_auth_response;
    3. Output when I run the send_auth_response procedure
    Connecting to the database cpdev.
    1
    2
    3
    4
    5
    5.5
    ORA-12560: TNS:protocol adapter error
    Process exited.
    Disconnecting from the database cpdev.
    Comments -
    The web service operation only has input message. The input message consists of a complex type as seen in WSDL.
    Questions -
    1. This is my first attempt in invoking a web service from pl/sql program. Is the code in SOAP body correct as mapped to the complex type in WSDL ?
    2. As seen from the dbms_out - the last message before ORA-12560 is 5.5, that means the call is erroring at following code line -
    http_req:= utl_http.begin_request ------ what am I doing wrong here ?
    3. The web service is SSL as seen from WSDLand needs a username/password for access - which is being performed by following code line -
    utl_http.set_authentication(http_req, '<username for webservice>', '<password for webservice user>'); ------- is that correct ?
    4. I am not using any proxy server - should I be using it ? When is it necessary to use proxy ?
    Appreciate any help.
    Thanx.

    Oracle is hosted by HOST A - this is where the pl/sql program resides.
    The Web Service being accessed by pl/sql program is hosted by HOST B and there are 4 firewalls in between.
    Oracle was not even able to establish connection to web services host.
    Escalated the issue with networking folks and they resolved the connectivity problem.
    Hope that helps.

  • Call MTOM web service using pl/sql (utl_http)

    Hi All,
    Is anyone able to call a MTOM web service using utl_http from pl/sql ?
    A typical request looks like this:
    --uuid:fd1fbed8-7042-4673-a304-becc1ffb037f+id=1
    Content-ID: <http://tempuri.org/0>
    Content-Transfer-Encoding: 8bit
    Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body>......</s:Body></s:Envelope>
    uuid:fd1fbed8-7042-4673-a304-becc1ffb037f+id=1
    A microsoft C# tool is provided to generate some requests and using fiddler I can see the content type is in the header as well as in the request. In the requests it doesn't contain the UID. Connection is set to keep-alive, is that possible using pl/sql ?
    The part that builds the header looks like:
    l_http_request := UTL_HTTP.begin_request(url => 'http://' || l_host_name || ':' || l_port || '/CRUDService.svc', method => 'POST', http_version => 'HTTP/1.1');
    UTL_HTTP.set_header(l_http_request, 'Host', l_host_name || ':' || l_port);
    UTL_HTTP.set_header(l_http_request, 'SOAPAction', '"action"');
    UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_string_request));
    UTL_HTTP.set_header(l_http_request, 'Content-ID', '<http://tempuri.org/0>');
    UTL_HTTP.set_header(l_http_request, 'Content-Transfer-Encoding', '8bit');
    UTL_HTTP.set_header(l_http_request, 'Content-Type', 'multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:fd1fbed8-7042-4673-a304-becc1ffb037f+id=1";start-info="text/xml"');
    I've played with the request by adding or removing information, the http response is (400) "Bad Request - Invalid Header", so should be somewhere in the header? Anyone ideas?
    Kind regards,
    Michiel

    HI Michiel
    I am also trying to achieve something similar to that. I am trying to call a web service that sends an xml attachment over MTOM? Kindly, let me know if this was achievable from your end? I mean how did the issue got resolved.
    thanks
    vijay

  • [SOLVED] Call an esb service using PL/SQL utl_http

    I would like to call an esb service using the UTL_HTTP package but I'm always getting the following exception: ORA-29266: end-of-body reached.
    My ESB uses an xml document as input-parameter and I'm not defining this in my procedure, how can I use a document-style parameter when calling the webservice.
    Could someboy point me out how to accomplish this functionality?
    If tried the examples about bpel procedures and utl_dbws and these work for bpel processes but not for esb services.

    Hi aprt of my article:
    http://orasoa.blogspot.com/2006/10/calling-bpel-process-from-raw-plsql.html
    Can you call the ESB service with the SOAPUi.org tool? If this works, than you must create the same request from PLSQL.
    Marc

  • Invoking P6 web services using PL/SQL block

    Hi Team,
    We have requirement like
    Oracle jobs will invoke PL/SQL code to authenticate and establish a session with the P6 Web services.
    Web service will export Project data from One Primavera database as an XML and copy to common location.
    Then this XML project files will be imported into archive database.
    Could anyone help me how I can establish sessio between Pl/SQL and P6 webservices?
    Please let me know if you need any more information.
    Regards,
    Santosh
    Edited by: SantoshV Singh on Apr 29, 2013 10:09 PM

    It will be no different than connecting to any web services through PL/SQL which is pretty hard to do and if you are asking how to do it then you have a steep learning curve ahead of you and not a great deal in the way of good examples out there.
    I wouldn't even attempt the approach you suggest.  Instead I would probably write a Java application to do it and use your PL/SQL to enqueue a message that routed to the Java application.  Then the java application with the Web Services support and P6 client would be easier to do what you want with web services.

  • REST web service using PL/SQL

    Hello,
    I am trying to learn how a REST web service can be created using PL/SQL and how it can be used.
    I am using this as a starting point.
    Also, I am using the pre-build "Oracle Developer Days" setup for this (which means I have 11.2 version of oracle database installed).
    I have done all the steps mentioned in the above blog post but when I try to access the web service in browser, I get the
    "404 Not found - The requested URL /devtest/rest-demo/departments was not found on this server" message.
    Here is my DAD setup :
    SQL> declare
      l_name dbms_epg.varchar2_table;
      l_value dbms_epg.varchar2_table;
    begin
      DBMS_EPG.GET_ALL_DAD_ATTRIBUTES (dad_name => 'devtest', attr_names => l_name, attr_values => l_value);
      for i in l_name.first..l_name.last
      loop
        dbms_output.put_line(l_name(i)||' => '||l_value(i));
      end loop;
    end;
      2    3    4    5    6    7    8    9   10   11  database-username => HR1
    path-alias => rest-demo
    path-alias-procedure => rest_handler.handle_requestI have created the package and procedures as mentioned in that blog post
    SQL> desc hr1.rest_handler
    PROCEDURE HANDLE_REQUEST
    Argument Name                  Type                    In/Out Default?
    P_PATH                         VARCHAR2                INHave I missed something ?
    Any help will be appreciated.
    Thanks

    Probably an security issue, I guess. The article (http://ora-00001.blogspot.com/2009/07/creating-rest-web-service-with-plsql.html) mentioned is a very good one (if not only I like what the site has become in recent years - much good tips and articles). As an alternative for your problems, have a look at the explaination of how Tim Hall has done it...
    http://www.oracle-base.com/articles/misc/XMLOverHTTP.php
    Edited by: Marco Gralike on Nov 21, 2011 11:31 AM

  • Call web service (multipart MIME soap request) using pl/sql (utl_http)

    I've the following header and http request.
    POST http://deab/DexNETWebServices_4_0_0_4/LoginService.svc HTTP/1.1
    MIME-Version: 1.0
    Content-Type: multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"
    VsDebuggerCausalityData: uIDPo5F/qXRc4YJImqB6Ard30cQAAAAAAjIXinpIVUulXLJOsSG7yyv7Lf2yHgpHlIxvc6oeqaAACQAA
    Host: deab
    Content-Length: 1017
    Expect: 100-continue
    Accept-Encoding: gzip, deflate
    Connection: Keep-Alive
    --uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1
    Content-ID: <http://tempuri.org/0>
    Content-Transfer-Encoding: 8bit
    Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
    <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserName</a:Action><a:MessageID>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://deab/DexNETWebServices_4_0_0_4/LoginService.svc</a:To></s:Header><s:Body><LoginByUserName xmlns="http://tempuri.org/"><systemId>19e0ddb4-5fa5-41ee-b624-aea762865a6c</systemId><strName>FirmwareUpdateLogQueryWorker</strName><productId>0af39a3e-6549-485b-872f-b73413203998</productId><password>abc</password></LoginByUserName></s:Body></s:Envelope>
    --uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1--
    I'm using the following code to set the header from PL/SQL and call the request. But UTL_HTTP.get_response returns the error 400 Bad Request.
    DECLARE
       l_request         CLOB;
       l_http_req        UTL_HTTP.req;
       l_http_resp       UTL_HTTP.resp;
       v_buffer          VARCHAR2 (32767);
       p_status_code     NUMBER (9);
       p_error_message   VARCHAR2 (32767);
       p_response        CLOB;
    BEGIN
      l_request :=
                '--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1'
             || CHR (13)
             || 'Content-ID: <http://tempuri.org/0>'
             || CHR (13)
             || 'Content-Transfer-Encoding: 8bit'
             || CHR (13)
             || 'Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"'
             || CHR (13)
             || CHR (13)
             || '<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserName</a:Action><a:MessageID>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://deab/DexNETWebServices_4_0_0_4/LoginService.svc</a:To></s:Header><s:Body><LoginByUserName xmlns="http://tempuri.org/"><systemId>'
             || '19e0ddb4-5fa5-41ee-b624-aea762865a6c'
             || '</systemId><strName>'
             || 'FirmwareUpdateLogQueryWorker'
             || '</strName><productId>'
             || '0af39a3e-6549-485b-872f-b73413203998'
             || '</productId><password>'
             || 'abc'
             || '</password></LoginByUserName></s:Body></s:Envelope>'
             || CHR (13)
             || '--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1--';
          DBMS_OUTPUT.put_line ('request ' || l_request);
          l_http_req := UTL_HTTP.begin_request ('http://deab/DexNETWebServices_4_0_0_4/LoginService.svc', 'POST', 'HTTP/1.1');
          UTL_HTTP.set_header (l_http_req, 'MIME-Version', '1.0');
          UTL_HTTP.set_header (
             l_http_req,
             'Content-Type',
             'multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"');
          --      UTL_HTTP.set_header (l_http_req, 'Content-ID', '<http://tempuri.org/0>');
          --      UTL_HTTP.set_header (l_http_req, 'Content-Transfer-Encoding', '8bit');
          UTL_HTTP.set_header (
             l_http_req,
             'VsDebuggerCausalityData',
             'uIDPo5F/qXRc4YJImqB6Ard30cQAAAAAAjIXinpIVUulXLJOsSG7yyv7Lf2yHgpHlIxvc6oeqaAACQAA');
          UTL_HTTP.set_header (l_http_req, 'Content-Length', LENGTH (l_request));
          --                  UTL_HTTP.set_header (l_http_req,
          --                                       'SOAPAction',
          --                                       'http://tempuri.org/ILoginService/LoginByUserName');
          UTL_HTTP.write_text (l_http_req, l_request);
          DBMS_LOB.createtemporary (p_response, FALSE);
          l_http_resp := UTL_HTTP.get_response (l_http_req);
       BEGIN
          LOOP
             UTL_HTTP.read_text (l_http_resp, v_buffer, 32767);
             DBMS_OUTPUT.put_line (v_buffer);
             DBMS_LOB.writeappend (p_response, LENGTH (v_buffer), v_buffer);
          END LOOP;
       EXCEPTION
          WHEN UTL_HTTP.end_of_body
          THEN
             NULL;
       END;
       UTL_HTTP.end_response (l_http_resp);
       p_status_code := l_http_resp.status_code;
       p_error_message := l_http_resp.reason_phrase;
       p_response := REPLACE (p_response, '&lt;', '<');
       p_response := REPLACE (p_response, '&gt;', '>');
       DBMS_OUTPUT.put_line (
          'Status: ' || p_status_code || '-' || p_error_message || ': ' || p_response);
    END;
    Thank you for your help on this.

    HI Michiel
    I am also trying to achieve something similar to that. I am trying to call a web service that sends an xml attachment over MTOM? Kindly, let me know if this was achievable from your end? I mean how did the issue got resolved.
    thanks
    vijay

  • Have Error invoking SSL web service using pl sql procedure

    Hi All,
    Please any one can tell where i am going wrong,in calling ssl soa web service from plsql procedure.
    Below steps i followed ssl configure in soa server
    1- For configuring ssl in soa 11g, i am going to weblogic console->environment-> servers-> soa_server1-> check ssl box of port 8002.
    2- restart the server.
    3- One process i devloped, deployed in em console, while trying to acces the service with 8002 port, i need to use https://servicepath.
    Is there is any problem in the above approch for configuring ssl in soa server.
    Now coming to the procedure part, in below i given the deatails
    DECLARE
    HTTP_REQ UTL_HTTP.REQ;
    HTTP_RESP UTL_HTTP.RESP;
    URL_TEXT VARCHAR2(32767);
    lv_process_xml_body varchar2(4000);
    BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    lv_process_xml_body:='<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Body xmlns:ns1="http://xmlns.oracle.com/SOA_RND_jws/Sample/DemoBPELProcess">
              <ns1:process>
                   <ns1:input></ns1:input>
    </ns1:process>
    </soap:Body>
    </soap:Envelope>';
    UTL_HTTP.SET_WALLET('file:/db/oracle/app/oradb/product/11.2.0/dbhome_1/bin/client', 'abcd123');
    HTTP_REQ := UTL_HTTP.BEGIN_REQUEST('https://172.28.40.20:8002/soa-infra/services/Client/Sample/demobpelprocess_client_ep', 'POST' , 'HTTP/1.0');
    UTL_HTTP.set_header(http_req, 'Content-Type', 'text/xml');
    UTL_HTTP.set_header(http_req, 'Content-Length', LENGTH(lv_process_xml_body));
    UTL_HTTP.SET_HEADER(HTTP_REQ, 'SOAPAction', 'process');
    UTL_HTTP.write_text(http_req, lv_process_xml_body);
    HTTP_RESP := UTL_HTTP.GET_RESPONSE(HTTP_REQ);
    UTL_HTTP.END_RESPONSE(HTTP_RESP);
    dbms_output.put_line('success');
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    END;
    But i am getting the error, unable to open the file
    Regarding certificate i have taken from the browser while running the above soa service in browser with 8002 port.
    Please let me know where i am doing wrong...
    Please if some one knows about steps ...... to do it to work
    Its urgent please help me out on this
    Thanks
    Dillip
    Edited by: 903915 on Dec 21, 2011 9:51 PM
    Edited by: 903915 on Dec 21, 2011 10:11 PM

    Oracle is hosted by HOST A - this is where the pl/sql program resides.
    The Web Service being accessed by pl/sql program is hosted by HOST B and there are 4 firewalls in between.
    Oracle was not even able to establish connection to web services host.
    Escalated the issue with networking folks and they resolved the connectivity problem.
    Hope that helps.

  • Java web service using pl/sql DB package - JDev 10.1.3.1

    Hi All,
    I wanted to create a java web service, instead of a pl/sql web service, that calls a pl/sql package in my DB.
    Jdev (10.1.3.1) can generate java code for my pl/sql package. But the generated code can't be used with a java web service. I've found that the generated code uses types that can't be serialized for a webservice (ie. java.sql.Timestamp).
    Does anyone know of a work around?
    Thanks!

    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    It's pretty well documented within Jdev also.
    Thanks, Rob

  • I need help to use PL/SQL UTL_HTTP package

    I need to use UTL_HTTP to get a page from Internet, and I already get the response. The following is the code.
    req := UTL_HTTP.BEGIN_REQUEST('http://www.yahoo.com);
    resp := UTL_HTTP.GET_RESPONSE(req);
    LOOP utl_http.read_line(resp, value, TRUE);
    dbms_output.put_line(value);
    -- DBMS_LOB.WRITEAPPEND (lob_c,LENGTH(value), value);
    END LOOP;
    utl_http.end_response(resp);
    other process
    EXCEPTION
    WHEN utl_http.end_of_body THEN
    utl_http.end_response(resp);
    However, after utl_http.read_line read the last line, it throw a exception.
    I want to know how can I avoid this situation and read all the response
    Thanks

    Hi,
    Check the Sample Code provided by Oracle.
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/x/Utl_Http_Package_Enhancements/Cr_Using_Utl_Http.htm
    Regards
    RK

  • How to download a SOAP attachment using pl/sql

    Gurus,
    I have a custom pl sql application that is web services based. The custom pl sql application invokes the external web services and updates Oracle Field Service application.
    One of the new requirements is to get the signatures from SOAP Attachments (a binary file) and attach it to Field Services transactions in Oracle.
    Does anyone has an example of how to download the SOAP attachment file from web service using pl/sql.
    The pl sql program uses UTL_HTTP to access web services.
    Much Thanx.

    I think you may be in the wrong forum, but anyways...
    What I think your looking for is the htp.print('insert html here'); function. It's plsql, and writes out html to the web server that calls it.
    if you search for htp.print you should find loads of examples.
    hope this helps.
    Merv.

  • Using MS Sql Server 2000 with Flex 2

    help! - I'm trying to understand how I could use Flex 2 (with
    the Flex Data Services) using MS SQL Server 2000 as my RDMS.
    Currently using SS with ASP. Basically, what do I need in
    terms of server set up (e.g. do I need to install the J2EE Server
    for instance?). How about using transaction based storedprocedures
    with flex.
    I'm having difficulty finding a clear answer (for me anyway!)
    to my question. I have even phoned Adobe last Thursday to ask them
    - and their expert was not around and they said would call me
    back... hmm.

    Hi Michael,
    At this time SQL Server 2000 is not certified for WLCS 3.5. Since the
    schema has changed between 3.2 and 3.5, running the 3.2 scripts is not a
    good idea.
    I can tell you that certification is in progress for SQL Server 2000. Your
    best bet is to contact your Sales Representative to get an idea of when
    certification might be coming.
    I hope this helps.
    - Ginny
    "Michael Schulz" <[email protected]> wrote in message
    news:[email protected]..
    I'm using WebLogic 6.0sp1 with Commerce Server 3.5 and I've successfully
    installed the demo. I would like to create another commerce server
    installation, this time using Microsoft SQL Server 2000 as the database
    instead of Cloudscape. I've downloaded and installed the BEA jDriver
    for MS SQL 7/2000 and tested it using dbping. My question is: where are
    the db scripts for creating and populating the commerce database? I've
    found the WLCS_320_DB_DDL_1.1.zip file on the BEA downloads site, but
    I'm concerned that this schema is for Version 3.20 of Commerce Server.
    Is there a similar file for WLCS 3.50? If not, is it safe to use this
    one?
    If this is posted in the wrong place, please let me know and I'll repost
    to the appropriate newsgroup as required.
    Sincerely,
    Michael Schulz

  • Upload blob to Content Services

    Hi
    Here's my problem... I have a blob in the E-Business Site iRecruitment table, IRC_DOCUMENTS. Using BPEL, I want to accept this blob and store it in Content Services using the filename in that table.
    I'm no java guru. Is this possible? How do I go about doing this?
    Thanks

    Hi Sancho
    1. When a new row is created in the iRecruitment table, I enqueue a message containing the BLOB and other data. In my BPEL process, I have a partner link that monitors and dequeues the message from the queue, then variables are assigned, which are read by a simple piece of embeded java code.
    2. This embeded java then creates a new folder in Content Services. So far so good. What I want to do next is to create a file in this new folder with the data from the BLOB. This is what I can't do yet, as I can't find the right documentation describing how this could be done.
    3. The requirements do not require me to maintain a link in iRecruitment (but who knows, that might change). Once the file is created (and there may be multiple files depending on the number rows read from the iRecruitement table, so I guess multiple enqueues), the process ends.
    Cheers
    Paul

  • Unable to start IDC Content Service(Very Urgent)

    Hi,
    My local system has Windows XP.I have installed Oracle 10g Express Edition,Apache,has jre1.6.0_03 and run the UCM installer.Both IDC Content Admin Service and IDC Content Service are set to start automatically during installation time."IDC Content Admin Service" is getting started automatically but "IDC Content Service" is not getting started.It is getting the following Error Message when we are starting IDC Content Service
    Error 1064 : An exception occured in the service when handling the Control Request.
    I have already installed Oracle Database 10g and D2k 10g also on my local system.
    i am getting following error in the log file
    Failed to initialize the server. Unable to initialize the system provider 'SystemDatabase'. Unable to create database connection for the database 'SystemDatabase' with connection string 'jdbc:oracle:thin:@localhost:1521:xe'. Please make sure that the connection string, user and password are correct. Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
    Unable to create database connection for the database 'SystemDatabase' with connection string 'jdbc:oracle:thin:@localhost:1521:xe'. Please make sure that the connection string, user and password are correct. Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
    java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe [ Details ]
    A fatal error has occurred. The stack trace below shows more information.
    !csFailedToInitServer!csProviderUnableToInitialize,SystemDatabase!csJdbcUnableToCreateConnection,SystemDatabase,jdbc:oracle:thin:@localhost:1521:xe!$Listener refused the connection with the following error:<br>ORA-12505\, TNS:listener does not currently know of SID given in connect descriptor<br>The Connection descriptor used by the client was:<br>localhost:1521:xe<br>!csJdbcUnableToCreateConnection,SystemDatabase,jdbc:oracle:thin:@localhost:1521:xe!$Listener refused the connection with the following error:<br>ORA-12505\, TNS:listener does not currently know of SID given in connect descriptor<br>The Connection descriptor used by the client was:<br>localhost:1521:xe<br>!syExceptionType2,java.sql.SQLException,Listener refused the connection with the following error:<br>ORA-12505\, TNS:listener does not currently know of SID given in connect descriptor<br>The Connection descriptor used by the client was:<br>localhost:1521:xe<br>
    intradoc.common.ServiceException: !csProviderUnableToInitialize,SystemDatabase!csJdbcUnableToCreateConnection,SystemDatabase,jdbc:oracle:thin:@localhost:1521:xe!$Listener refused the connection with the following error:
    ORA-12505\, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
         at intradoc.server.IdcSystemLoader.loadProviders(IdcSystemLoader.java:1949)
         at intradoc.server.IdcSystemLoader.initProviders(IdcSystemLoader.java:1729)
         at intradoc.server.IdcSystemLoader.finishInit(IdcSystemLoader.java:221)
         at intradoc.server.IdcSystemLoader.init(IdcSystemLoader.java:185)
         at intradoc.server.IdcServerManager.init(IdcServerManager.java:73)
         at IdcServerNT.init(IdcServerNT.java:86)
         at IdcServerNT.main(IdcServerNT.java:54)
    Caused by: intradoc.data.DataException: !csJdbcUnableToCreateConnection,SystemDatabase,jdbc:oracle:thin:@localhost:1521:xe!$Listener refused the connection with the following error:
    ORA-12505\, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
         at intradoc.jdbc.JdbcConnectionUtils.getConnection(JdbcConnectionUtils.java:88)
         at intradoc.jdbc.JdbcWorkspace.init(JdbcWorkspace.java:97)
         at intradoc.provider.Provider.init(Provider.java:68)
         at intradoc.server.IdcSystemLoader.loadProviders(IdcSystemLoader.java:1937)
         ... 6 more
    Caused by: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
         at oracle.jdbc.driver.PhysicalConnection.&#60;init&#62;(PhysicalConnection.java:441)
         at oracle.jdbc.driver.T4CConnection.&#60;init&#62;(T4CConnection.java:165)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
         at java.sql.DriverManager.getConnection(DriverManager.java:525)
         at java.sql.DriverManager.getConnection(DriverManager.java:171)
         at intradoc.jdbc.JdbcConnectionUtils.getConnection(JdbcConnectionUtils.java:70)
         ... 9 more
    The Oracle Homes are different for both the Oracle.
    If somebody have idea about this problem,please help me. This is very urgent.
    Manoj Baghel
    [email protected]

    I think so..
    Your Oracle Database doesn't connect to content server..
    Maybe, you can edit the configuration of your UCM..
    Please open the file at C:\oracle\ucm\server\config\config.cfg..
    And then add the code :
    NumConnection = 5;
    CMIIW

  • Which SQL queries to count on OFO 9042 & Content Services 10120

    Dear experts,
    In customer context we urgently need to know which SQL queries to use :
    - to count on OFO 9.0.4.2 the number of workspaces
    - to count on OFO 9.0.4.2 the number of metadata elements (categories & attributes) attached to documents
    - to count on Content Services 10.1.2.0 the number of containers
    - to count on Content Services 10.1.2.0 the number of libraries
    - to count on Content Services 10.1.2.0 the number of folders
    - to count on Content Services 10.1.2.0 the number of groups
    - to count on Content Services 10.1.2.0 the number of categories
    - to count on Content Services 10.1.2.0 the number of attributes
    - to count on Content Services 10.1.2.0 the number of workspaces
    Thank a lot for your kind answer.
    Best regards.
    Jean-Francois

    Congrats to Shanky and Durval!
     SQL Server General and Database Engine Technical Guru - June 2014  
    Shanky
    SQL Server: What does Column Compressed Page Count Value Signify
    in DMV Sys.dm_db_index_physical_stats ?
    DB: "Interesting and detailed"
    DRC: "• This is a good article and provides details of each and every step and the output with explanation. Very well formed and great information. • We can modify the create table query with “DEFAULT VALUES". CREATE TABLE [dbo].[INDEXCOMPRESSION](
    [C1] [int] IDENTITY(1,1) NOT NULL, [C2] [char](50) NULL DEFAULT 'DEFAULT TEST DATA' ) ON [PRIMARY]"
    GO: "Very informative and well formed article as Said says.. Thanks for that great ressource. "
    Durval Ramos
    How to get row counts for all Tables
    GO: "As usual Durva has one of the best articles about SQL Server General and Database Engine articles! Thanks, buddy!" "
    Jinchun Chen: "Another great tip!"
    PT: "Nice tip" 
    Ed Price: "Good topic, formatting, and use of images. This would be far better if the examples didn't require the black bars in the images. So it would be better to scrub the data before taking the screenshots. Still a good article. Thank you!"
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

Maybe you are looking for

  • Problem job/submit a FM

    Hi! I have this code: SELECT SINGLE PROCPROG JOBNAME   INTO (lv_procprog, lv_jobname)   FROM ZGL_MPF_CONFIG   WHERE interfacename = INTERFACENAME.   CALL FUNCTION 'JOB_OPEN'     EXPORTING       jobname                = lv_jobname     IMPORTING      

  • Why do I have 2 camera rolls in my iPhone 4?

    Why do I have 2 Camera Rolls in my iPhone 4 Photos? The seconf Camera Roll has many dupes. Why does Camera Roll not automatically sync with Pictures in my laptop?

  • Partner Function in Vendor master

    Hi,   I want to know what is partner functions in Vendor master  , what configuration settings required for it  and is it necessary to maintain  what can be the problem or why it use . regards, zafar

  • Outlook Password input Screen

    Greetings I have a small Bed&Breakfast client that has the following situation: 1) 5 people use the same Reception PC at all times of the day. 2) There are programs running on the PC that require that the same user be logged in all the time (so I can

  • Mighty Mouse Setup

    Ok, so I just bought a new wireless mighty mouse. I have it setup and running and all the software installed. It works... but I can't get it to do the simple things my old mouse did. I can't get the left and right buttons to function independently of