Support for Creating Web Service from pl/sql package in JDeveloper 11

We have been creating all of our web services from pl/sql packages in our Oracle database using JDeveloper 10.1.3.1. I understand that this capability is not supported in Jdev 11. We have been mandated to either move up to JDeveloper 11, or consider switching to eclipse, or even VS2008 and run .NET services from IIS. I have seen work-around solutions using TopLink and Jdev 11. Are there plans to revive this feature in the near future? We're now looking at switching to .NET since we could scrap our OAS instances and use IIS to publish web services. The only reason we were sticking with Oracle was the ease in converting all our existing package to web services with Jdev.
Is anyone else in the same situation. If so, what solutions are you considering?

Hi,
there are a lot of option to make plsql web services .
First you can stay with jdev 10.1.3
Use the xmldb servlets
use jdev 11g tp4 to create plsql ws and upgrade to jdev 11g production
And I think in the next release of jdev it will be back , there are more options which disappeared like the adf bc sdo ws or jmx datacontrol etc.
thanks Edwin

Similar Messages

  • Invoking Web Service From PL SQL package

    Below is the sample code to invoke web service from pl/sql package using UTL_HTTP:
    Declare
    http_req UTL_HTTP.req;
    http_resp UTL_HTTP.resp;
    Begin
    http_req :=
    UTL_HTTP.begin_request
    'http://'
    || lv_hosturl
    -- || '.net/soa-infra/services/finance_rt/Payments/paymentsprocess_client_ep',
    --new url
    || '.net/soa-infra/services/finance_rt/PaymentsReq/paymentsprocess_client_ep?WSDL',
    'POST',
    'HTTP/1.1'
    UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml');
    -- since we are dealing with plain text in XML documents
    UTL_HTTP.set_header (http_req,
    'Content-Length',
    LENGTH (lv_soap_request)
    UTL_HTTP.set_header (http_req, 'SOAPAction', '');
    -- required to specify this is a SOAP communication
    UTL_HTTP.write_text (http_req, lv_soap_request);
    http_resp := UTL_HTTP.get_response (http_req);
    UTL_HTTP.read_text (http_resp, lv_soap_respond);
    UTL_HTTP.end_response (http_resp);
    resp := XMLTYPE.createxml (lv_soap_respond);
    End;

    Hi,
    there are a lot of option to make plsql web services .
    First you can stay with jdev 10.1.3
    Use the xmldb servlets
    use jdev 11g tp4 to create plsql ws and upgrade to jdev 11g production
    And I think in the next release of jdev it will be back , there are more options which disappeared like the adf bc sdo ws or jmx datacontrol etc.
    thanks Edwin

  • Creating web service from pl/sql procedure

    Hello.
    I need to create a web service from pl/sql procedure and i chose JDeveloper for this implementation. I have wsdl, but I never created web services. So, I created web service with document/literal message format.
    But I have several troubles:
    1. All element names have lower case letters.
    2. The SOAP envelope must begin from words soapenv:Envelope but i have soap:Envelope.
    3. And operation name has tail like "Element".
    I know bad way for implement 1 and 3 points. It's a modification of java_wsdl_mapping.xml and wsdl files. But if I want to add new method to my service all changes will be cleaned. It's not critical but inconvenient to support.
    But for point 3 i have no ideas.
    This task is very important for me. Can somebody help me?
    JDeveloper 10.1.3.3
    Regards,
    Aleksey

    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    Frank

  • Creating PL/SQL web services from PL/SQL records

    Hello
    Jdeveloper does not allow to create web services from pl/sql packages that use PL/SQL records.to do this,we have to use the jpublisher ?without using the jpublisher,if we create a webservice then the following error is displayed in the web service xml output file.
    <faultstring>Internal Server Error (Caught exception while handling request: java.rmi.RemoteException: java.sql.SQLException: ORA-06550: line 1, column 49: PLS-00181: unsupported preprocessor directive '$WS_SP_EVEN' )</faultstring>
    </env:Fault>
    Could any one suggest me, how to solve the above issue..?
    Regards
    Malathi

    Thank you, with db adapter it was working and also
    pl/sql web-services working successfully with object types.If we want to send the web-services to the client, do we need to send the entire folder that is created in the web-services folder of the external oc4j..?
    Creating the client process:
    we are using the wsdl file that is generated in the web-services and adding to the partner link to Invoke the operations of web-services. Is there any other way to invoke the webservices?Could any one please suggest me?
    Thanking you
    Malathi

  • Problem in generate Java  from PL SQL package in Jdeveloper

    Hi
    i have problem in create java class from PL SQL package in JDeveloper.
    I use Database navigator of jdeveloper and right click on a package and choose Generate Java then in Jpublisher window choose my view Controller and accept other default values.
    I call methods of generated class in the Action of a button in my JSP page, but when I click the button it  throw null pointer exception !!! i fund one of generated method return null and it lead to this exception.
    protected DefaultContext __tx = null;
    public DefaultContext getConnectionContext() throws SQLException  {
    if (__tx==null){
    __tx = (getConnection()==null) ? DefaultContext.getDefaultContext() : new DefaultContext(getConnection());
        return __tx;
      public Connection getConnection() throws SQLException
        if (__onn!=null) return __onn;
         else if (__tx!=null) return __tx.getConnection();
         else if (__dataSource!=null) __onn= __dataSource.getConnection();
         return __onn;
    i try to generate class in Model project and create DataControl for that and use method action but noting change and i get null pointer again!!
    Jdeveloper Versino = 11.1.1.7.0

    Let me ask you another question: Why do you generate java from the package at all?
    Where do you want to call the package?
    Back to your question: you should see code like
        public void setDataSourceLocation(String dataSourceLocation) throws SQLException {
            javax.sql.DataSource dataSource;
            try {
                Class cls = Class.forName("javax.naming.InitialContext");
                Object ctx = cls.newInstance();
                java.lang.reflect.Method meth = cls.getMethod("lookup", new Class[] { String.class });
                dataSource = (javax.sql.DataSource) meth.invoke(ctx, new Object[] { "java:comp/env/" + dataSourceLocation });
                setDataSource(dataSource);
            } catch (Exception e) {
                throw new java.sql.SQLException("Error initializing DataSource at " + dataSourceLocation + ": " + e.getMessage());
    in the generated code. This code look up a datasource (which you have defined e.g. on the Weblogic Server) by calling the method
    setDataSourceLocaltion("jdbc/HRConnDS");
    This look up the datasource nad stores it in the class variable.
    Timo

  • SR: Calling Web Services from PL/SQL gives http 500 errors

    Hi, people from Oracle Support sent me to this forum.
    I'm trying to call the Calendar Web Services from PL/SQL using the utl_http package, but I'm getting http-500 errors.
    I'm using the example from http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    Here's the code
    procedure showHtml
    as
    req soap_rpc.request;
    resp soap_rpc.response;
    BEGIN
    req := soap_rpc.new_request('cwsl:NoOp',
    'xmlns:cwsl="http://www.oracle.com/WebServices/Calendaring/1.0/"');
    resp := soap_rpc.invoke(req,
    'http://nllx004.nl.oracle.com/ocws-bin/ocas.fcgi',
    dbms_output.put_line(resp.doc.getStringVal());
    END;
    Can anyone help?

    I am new to web services and am having trouble getting the utl_http.set_header call to work using pl/sql. listed below is the code.
    CREATE OR REPLACE PACKAGE BODY adm_iModules_test
    AS
    NAME: Admissions iModules testing program
    PURPOSE:
    Ver Date Author Description
    REVISIONS:
    1.0 01/04/08 Julie Michael 1. Created this package body.
    PROCEDURE adm_iModules_test_output
    IS
    --cursor to select data to populate output file
    CURSOR c_iModules_main
    IS
    SELECT DISTINCT spriden_id sprid_id,
                                  spriden_pidm sprid_pidm,
                                  spriden_last_name sprid_last,
    spriden_first_name sprid_first,
                                  spriden_MI sprid_mid,
    spriden_create_date sprid_create_date,
    spriden_activity_date sprid_activity_date,
                                  spbpers_pidm pers_pidm,
    spbpers_name_prefix prefix,
    spbpers_name_suffix suffix,
                                  spbpers_dead_ind deceased_ind,
                                  spbpers_dead_date deceased_date,
                                  spbpers_birth_date, --added birth date
                                  spbpers_sex, --added gender
                                  goremal_pidm emal_pidm,
    goremal_email_address email_address,
                                  saradap_pidm app_pidm,
                                  zzrimod_member_id imod_id,
                                  gobtpac_external_user user_id
    FROM spriden,
    spbpers,
    goremal,
                                  saradap,
                                  zzrimod,
                                  gobtpac
    WHERE spriden_pidm = spbpers_pidm
    AND spriden_change_ind IS NULL
    AND spriden_pidm = goremal_pidm
                             AND goremal_emal_code = 'PERS'
                             AND goremal_preferred_ind = 'Y'
                             AND spriden_pidm = saradap_pidm
                             AND spriden_pidm = 120116
                             AND spriden_pidm = gobtpac_pidm
                             AND spriden_pidm = zzrimod_pidm(+)
                             AND goremal_preferred_ind = 'Y'
                             AND saradap_term_code_entry in ('200810','200820','200830');
         v_record      VARCHAR2 (32000) := null;
         v_record_counter               NUMBER                    := 0;
    f_iModules_output_test UTL_FILE.file_type;
    f_iModules_filename_test VARCHAR2 (50) := 'Adm_iModules_Test.TXT';
    f_iModules_dir_test VARCHAR2 (100) := 'TMP';
         v_separator                    VARCHAR2 (50)          := ',';
         v_id                              VARCHAR2 (90)          := '';
         v_fname                         VARCHAR2 (40)          := '';
         v_lname                         VARCHAR2 (40)          := '';
         v_user                         VARCHAR2 (90)          := '';
         v_login                         VARCHAR2 (100)          := '';
         v_password                    VARCHAR2 (100)          := '';
    -- v_link                         VARCHAR2 (32767)     := 'http://imodules.com/Web%20Services/';
         --the below item 'http://admin.imodules.com - was https://admin.imodules.com
         v_link                         VARCHAR2 (32767)      := 'http://admin.imodules.com/ws_10/MemberQuery.asmx?WSDL';
         v_non_existing_ids          VARCHAR2 (100)          := '"false"';
         v_style                         VARCHAR2 (5)           := '"1"';
         v_imod_member_id               VARCHAR2 (100)      := '';
         v_spriden_first_name           VARCHAR2 (60)          := '';
         req                Utl_Http.req;           --for posting
         resp                Utl_Http.resp;          --for posting
         v_msg                VARCHAR2(80);          --for posting
         H_Name                VARCHAR2(255);          --for posting
         H_Value                VARCHAR2(1023);     --for posting
         v_data_xml                    VARCHAR2(10000);
         BEGIN
                   DBMS_OUTPUT.ENABLE(1000000);
              f_iModules_output_test := UTL_FILE.fopen (f_iModules_dir_test, f_iModules_filename_test, 'w',32767);
                   v_record := '';
                   --needed for posting
    --                Utl_http.set_proxy(proxy => 'xxx.yyy.com',
    --      no_proxy_domains => 'xxx.com');
                   req := Utl_Http.begin_request(url => v_link,
    method => 'POST');
    --                          FOR v_iModules2 IN c_iModules_main
    --                          LOOP     
    --                                    v_record_counter := v_record_counter + 1;
    --                          END LOOP;
                             -- v_record := 'DUQ'||','||v_record_counter||','||to_char(SYSDATE,'mm/dd/yyyy');
                             UTL_FILE.put_line (f_iModules_output_test, v_record, false);     
                                       v_record := null;
                                  FOR v_iModules IN c_iModules_main
                                  LOOP
                                            v_id := v_imodules.sprid_id;
                                            v_fname := v_imodules.sprid_first||'test';
                                            v_lname := v_imodules.sprid_last;     
                                            v_user := '"'||v_imodules.email_address||'"';
                                            v_imodules.imod_id := '29';
                                            v_imod_member_id := '"'||v_imodules.imod_id||'"';
                                            v_spriden_first_name := '"SPRIDEN_FIRST_NAME"';
                                            v_login := '"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"';
                                            v_password := '"xxxxxxxxxxxxxxxxxxxxxxxx"';
                                            v_record :='<?xml version="1.0" encoding="utf-8"?>'||
                                            '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'||' '||
                                            'xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'||
                                            '<soap:Body>'||'<Update xmlns:m='||v_link||'>'||'<AUTHENTICATION login='||v_login||' '||
                                            'password='||v_password||' '||'addNonExistingIDs='||v_non_existing_ids||' '||'style='||
                                            v_style||'/>'||'<MemberInformation ZZRIMOD_MEMBER_ID='||v_imod_member_id||'>'||
                                            '<SPRIDEN_FIRST_NAME>'||v_fname||'</SPRIDEN_FIRST_NAME>'||'</MemberInformation>'||'</Update>'||
                                            '</soap:Body></soap:Envelope>';
    --                                         v_record := v_record := v_record||'<Update xmlns:m='||v_link||'>'||'<AUTHENTICATION login='||v_user||'>'||' '||
    --                                                   'password='||v_password||' '||'addNonExistingIDs='||v_non_existing_ids||' '||'style='||
    --                                                   v_style||'/>'||'<MemberInformation ZZRIMOD_MEMBER_ID='||v_imod_member_id||' '||
    --                                                   'column='||'"SPRIDEN_FIRST_NAME"'||' '||'newValue='||v_fname||'/>'||'</Update>';
                                            dbms_output.put_line('code: '||v_record);
                                            --v_record := v_record||v_separator||v_id||v_separator||v_name||v_separator||v_email;
                                       --Http posting calls
                                            Utl_Http.set_header(r => req,
                                            name => 'Content-Type',
                                            value => 'text/xml');
                                       Utl_Http.set_header(r => req,
                                            name => 'Content-Length',
                                            value => to_char(length(v_record)) );
                                            --JAM 03/25/08 - added to accomodate the missing soap action error                           
                                            Utl_Http.set_header(r => req,
                                            name => 'SOAPAction',
                                            value => 'http://admin.imodules.com/ws_10/MemberQuery.asmx?WSDL');
                                            Utl_Http.set_header(r => req,
                                            name => 'MessageType',
                                            value => 'CALL');
    --                                    Utl_Http.set_authentication(r => req,
    --                                         username => 'zzz',
    --                                                   password => 'ppppp',
    --                               scheme => 'Basic',
    --                               for_proxy => FALSE);
                                       Utl_Http.write_text(r => req,
                                            data => v_record);     
                                            resp := Utl_Http.get_response(r => req,
                             return_info_response => TRUE);
                                            DBMS_OUTPUT.put_line('Status Code: ' || resp.status_code);
                                            DBMS_OUTPUT.put_line('Reason Phrase: ' || resp.reason_phrase);
                                            dbms_output.put_line('testing');
                                            FOR i IN 1 .. Utl_Http.get_header_count(r => resp)
                                            LOOP
                                            Utl_Http.get_header(r => resp,
                   n => i,
                   name => H_Name,
                   value => H_Value);
                                            --DBMS_OUTPUT.put_line( ... );
                                            END LOOP;
                                            BEGIN
                                            LOOP
                                            Utl_Http.read_text(r => resp, DATA => v_msg);
                                            DBMS_OUTPUT.put_line(v_msg);
                                            END LOOP;
                                                 EXCEPTION
                                                 WHEN Utl_Http.end_of_body THEN
                                                 NULL;
                                                 END;          
                                                 Utl_Http.end_response(r => resp);      
    --                                              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('Http_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('Others2: '||Utl_Http.Get_Detailed_Sqlerrm);     
    --                                                   Utl_Http.end_response(r => resp);     
    --                                              END;
                                            --End of Htp posting calls
                                            --UTL_FILE.put_line (f_iModules_output_test, v_record, false);
                                            --htp.p('<post>'||v_record||'</post>');
                                            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('Http_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('Others2: '||Utl_Http.Get_Detailed_Sqlerrm);     
                                                      Utl_Http.end_response(r => resp);     
                                                 END;
                        -- close output file
                   --UTL_FILE.fclose (f_iModules_output_test);
                             --COMMIT;
                             /*EXCEPTION
                        WHEN OTHERS
                        THEN
                   ROLLBACK;
                   DBMS_OUTPUT.put_line ('Other Exception:' || SQLERRM);
                             -- DBMS_OUTPUT.put_line ('Other Exception:' || Utl_Http.Get_Detailed_Sqlerrm);
                             --COMMIT; */
                             -- END adm_iModules_test_output;
                             END adm_iModules_test;
    Message was edited by:
    user627523

  • Error while calling .svc web service from pl/sql using utl_dbws

    Hello Folks,
    I am calling a .svc web service from pl/sql using utl_dbws and encountering the following error
    javax.xml.rpc.soap.SOAPFaultException: The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
    Can you help me find what am I doing wrong?
    Thanks
    Rk

    Hi,
    Here are the details
    1. What version?
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    2. What error message ... we need the full and complete error stack not your interpretation of it.
    ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException: The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Messag
    3. "I am calling means what?" We need the full and complete statement showing the values of all parameters.
    The input to the web-service is a xmltype containing address information and the web-service returns a string
    CREATE OR REPLACE FUNCTION get_id
    RETURN VARCHAR2
    AS
    l_service UTL_DBWS.service;
    l_call UTL_DBWS.CALL;
    l_wsdl_url VARCHAR2 (32767);
    l_namespace VARCHAR2 (32767);
    l_service_qname UTL_DBWS.qname;
    l_port_qname UTL_DBWS.qname;
    l_operation_qname UTL_DBWS.qname;
    l_xmltype_in SYS.XMLTYPE;
    l_xmltype_out SYS.XMLTYPE;
    l_return VARCHAR2 (32767);
    BEGIN
    l_wsdl_url := 'http://test.com/test.svc?wsdl';
    l_namespace := 'http://test.org/';
    l_service_qname := UTL_DBWS.to_qname (l_namespace, 'SName');
    l_port_qname := UTL_DBWS.to_qname (l_namespace, 'BasicHttpBinding_ISName');
    l_operation_qname := UTL_DBWS.to_qname (l_namespace, 'Iden');
    l_service :=
    UTL_DBWS.create_service
    (wsdl_document_location => urifactory.geturi
    (l_wsdl_url),
    service_name => l_service_qname
    l_call :=
    UTL_DBWS.create_call (service_handle => l_service,
    port_name => l_port_qname,
    operation_name => l_operation_qname
    l_xmltype_in :=
    SYS.XMLTYPE
    ('<IdenRequest xmlns:i="http://www.w3.org/XMLSchema-instance" xmlns="http://test.org/SNameIden.WCFService">
    <address />
    <zip>12345</zip>
    <state>AA</state>
    <street>W Test </street>
    </address>
    </IdenRequest>'
    l_xmltype_out :=
    UTL_DBWS.invoke (call_handle => l_call,
    request => l_xmltype_in);
    UTL_DBWS.release_call (call_handle => l_call);
    UTL_DBWS.release_service (service_handle => l_service);
    l_return := l_xmltype_out.EXTRACT ('//Iden/text()').getstringval();
    RETURN l_return;
    END;
    /

  • New to Web Services - need to call a HTTPS web service from PL/SQL

    I am new to Web Services and need to call HTTPS web service from PL/SQL program. I am using 10g Database.
    I have been reading there are 2 options -
    1. UTL_HTTP - with this package its possible to call HTTPS web services
    2. UTL_DBWS
    Questions -
    1. Is it possible to call a HTTPS web service using UTL_DBWS ? I have not been able to find any information on it.
    2. Can someone point me to UTL_HTTP and UTL_DBWS examples calling a HTTPS web service ?
    3. The HTTPS web service that I need to call needs username/password to connect - how will I incorporate this in the pl/sql code ?
    Appreciate the help.
    Cheers,
    newWebServicesUser

    Hi,
    1. UTL_DBWS not work for https from what I understand
    2. Here is a sample example:
    [http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php#]
    Be careful, you must change http/1.0 IN 1.1 inside package SOAP_API.
    Here is an example for a prime number where the SOAP message is already construct:
    CREATE OR REPLACE procedure test_ws_2
    IS
    http_req utl_http.req;
    http_resp utl_http.resp;
    request_env varchar2(32767);
    response_env varchar2(32767);
    begin
    -- Set proxy details if no direct net connection.
    UTL_HTTP.set_proxy('http://<USER>:<PASS>@10.0.2.21:8070', NULL);
    UTL_HTTP.set_persistent_conn_support(TRUE);
    request_env:='<?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/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">'||
    '<SOAP-ENV:Body><GetPrimeNumbers xmlns="http://microsoft.com/webservices/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
    '<max xsi:type="xsd:int">10</max>'||
    '</GetPrimeNumbers></SOAP-ENV:Body></SOAP-ENV:Envelope>';
    dbms_output.put_line('Length of Request:' || length(request_env));
    dbms_output.put_line ('Request: ' || request_env);
    http_req := utl_http.begin_request('http://www50.brinkster.com/vbfacileinpt/np.asmx','POST', utl_http.HTTP_VERSION_1_1);
    utl_http.set_header(http_req, 'Content-Type', 'text/xml; charset=utf-8');
    utl_http.set_header(http_req, 'Content-Length', length(request_env));
    utl_http.set_header(http_req, 'SOAPAction', '"http://microsoft.com/webservices/GetPrimeNumbers"');
    utl_http.write_text(http_req, request_env);
    dbms_output.put_line('');
    http_resp := utl_http.get_response(http_req);
    dbms_output.put_line('Response Received');
    dbms_output.put_line('--------------------------');
    dbms_output.put_line ( 'Status code: ' || http_resp.status_code );
    dbms_output.put_line ( 'Reason phrase: ' || http_resp.reason_phrase );
    utl_http.read_text(http_resp, response_env);
    dbms_output.put_line('Response: ');
    dbms_output.put_line(response_env);
    utl_http.end_response(http_resp);
    end test_ws_2;
    Otherwice for testing url, i recommand you to use that function: Re: Error using UTL_HTTP over HTTPS
    it's a verry helpful function when you have an error.
    wrote:
    When testing using UTL_HTTP, you MUST ensure that you open a new session after importing the SSL certificates into your Wallet,
    as I've learned (the hard way) that existing sessions point to the wallet contents that were present when the session was opened.
    If you don't realise/know this, it can cause a lot of additional frustration during testing, when you keep getting the ORA-29024 exception AFTER
    you've imported the SSL certificates................. ;) 3. i think you can use that after the begin_request but not sure :
    UTL_HTTP.set_authentication(r => http_req,
    username => ,
    password => ,
    scheme => ,
    for_proxy => );
    Edited by: Malebodja on Oct 22, 2009 6:53 AM
    Edited by: Malebodja on Oct 22, 2009 6:55 AM

  • Access a web service from pl/sql

    I am trying to access a web service from pl/sql. I have downloaded the code from
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    But when I try to execute the sql, I am getting the following error:
    SQL> @local.sql
    Package created.
    Package body created.
    No errors.
    BEGIN dbms_output.put_line(time_service.get_local_time('94065')); END;
    ERROR at line 1:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1022
    ORA-12545: Connect failed because target host or object does not exist
    ORA-06512: at "WEB.DEMO_SOAP", line 71
    ORA-06512: at "WEB.TIME_SERVICE", line 15
    ORA-06512: at line 1
    It is failing at:
    resp := demo_soap.invoke(req,
    'http://www.ripedev.com/webservices/LocalTime.asmx',
    'http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode');
    But in the examples that I got from downloading source code, site used was:
    'http://www.alethea.net/webservices/LocalTime.asmx',
    'http://www.alethea.net/webservices/LocalTimeByZipCode');
    This site was not accessible. So I changed to the working site as follows, but still I
    am getting the above error.
    But I can access this site, if I type in the above address in the address bar of IE.
    Can any body help?
    I have oracle9i client installed on my machine and able to connect to server thru toad and sql plus.
    or IF any body refers me to a good website for the topic of "using webservies from pl/sql" that would be great too!

    Here is the complete code:
    time_service:
    CREATE OR REPLACE PACKAGE time_service AS
    FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2;
    END;
    CREATE OR REPLACE PACKAGE BODY time_service AS
    -- Location of Web service definition
    -- http://www.alethea.net/webservices/LocalTime.asmx?WSDL
    -- http://www.ripedev.com/webservices/LocalTime.asmx?WSDL
    -- http://www.xmethods.com/sd/2001/CurrencyExchangeService.wsdl
    --'http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode style=document');
    FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2 IS
    req demo_soap.request;
    resp demo_soap.response;
    BEGIN
    dbms_output.put_line('before new request..');
    req := demo_soap.new_request('LocalTimeByZipCode',
    'xmlns="http://ripedev.com/xsd/ZipCodeResults.xsd"');
    dbms_output.put_line('before add param..');
    demo_soap.add_parameter(req, 'ZipCode', 'xsd:string', zipcode);
    dbms_output.put_line('before invoke..');
    resp := demo_soap.invoke(req,
    'http://www.ripedev.com/webservices/LocalTime.asmx',
    'http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode');
    dbms_output.put_line('before return..');
    RETURN demo_soap.get_return_value(resp, 'LocalTimeByZipCodeResult',
    'xmlns="http://www.ripedev.com/webservices/"');
    END;
    BEGIN
    dbms_output.put_line('inside main time_service..');
    END;
    show errors
    SET serveroutput ON
    exec dbms_output.put_line(time_service.get_local_time('94065'));
    Here is demo_soap.sql:
    Rem
    Rem $Header: soapdemo.sql 21-may-2002.13:48:17 rpang Exp $
    Rem
    Rem soapdemo.sql
    Rem
    Rem Copyright (c) 2002, Oracle Corporation. All rights reserved.
    Rem
    Rem NAME
    Rem soapdemo.sql - <one-line expansion of the name>
    Rem
    Rem DESCRIPTION
    Rem A PL/SQL demo package for making SOAP RPC calls.
    Rem
    Rem NOTES
    Rem This demo package can only be used in oracle 9ir2. It utilizes 9iR2's
    Rem XDB (XMLType and HttpUriType) and 9iR1's enhancements to UTL_HTTP to
    Rem make SOAP RPC calls.
    Rem
    Rem MODIFIED (MM/DD/YY)
    Rem rpang 05/21/02 - created
    Rem
    Rem A PL/SQL demo package that makes a SOAP RPC calls.
    Rem
    CREATE OR REPLACE PACKAGE demo_soap AS
    /* A type to represent a SOAP RPC request */
    TYPE request IS RECORD (
    method VARCHAR2(256),
    namespace VARCHAR2(256),
    body VARCHAR2(32767));
    /* A type to represent a SOAP RPC response */
    TYPE response IS RECORD (
    doc xmltype);
    * Create a new SOAP RPC request.
    FUNCTION new_request(method IN VARCHAR2,
    namespace IN VARCHAR2)
    RETURN request;
    * Add a simple parameter to the SOAP RPC request.
    PROCEDURE add_parameter(req IN OUT NOCOPY request,
    name IN VARCHAR2,
    type IN VARCHAR2,
    value IN VARCHAR2);
    * Make the SOAP RPC call.
    FUNCTION invoke(req IN OUT NOCOPY request,
    url IN VARCHAR2,
    action IN VARCHAR2) RETURN response;
    * Retrieve the sipmle return value of the SOAP RPC call.
    FUNCTION get_return_value(resp IN OUT NOCOPY response,
    name IN VARCHAR2,
    namespace IN VARCHAR2) RETURN VARCHAR2;
    END;
    show errors
    CREATE OR REPLACE PACKAGE BODY demo_soap AS
    FUNCTION new_request(method IN VARCHAR2,
    namespace IN VARCHAR2)
    RETURN request AS
    req request;
    BEGIN
    req.method := method;
    req.namespace := namespace;
    RETURN req;
    END;
    PROCEDURE add_parameter(req IN OUT NOCOPY request,
    name IN VARCHAR2,
    type IN VARCHAR2,
    value IN VARCHAR2) AS
    BEGIN
    req.body := req.body ||
    '<'||name||' xsi:type="'||type||'">'||value||'</'||name||'>';
    END;
    PROCEDURE generate_envelope(req IN OUT NOCOPY request,
                   env IN OUT NOCOPY VARCHAR2) AS
    BEGIN
    env := '<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body><'||req.method||' '||req.namespace||'
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
    req.body||'</'||req.method||'></SOAP-ENV:Body></SOAP-ENV:Envelope>';
    END;
    PROCEDURE show_envelope(env IN VARCHAR2) AS
    i pls_integer;
    len pls_integer;
    BEGIN
    i := 1; len := length(env);
    WHILE (i <= len) LOOP
    dbms_output.put_line(substr(env, i, 60));
    i := i + 60;
    END LOOP;
    END;
    PROCEDURE check_fault(resp IN OUT NOCOPY response) AS
    fault_node xmltype;
    fault_code VARCHAR2(256);
    fault_string VARCHAR2(32767);
    BEGIN
    fault_node := resp.doc.extract('/soap:Fault',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/');
    IF (fault_node IS NOT NULL) THEN
    fault_code := fault_node.extract('/soap:Fault/faultcode/child::text()',
         'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
    fault_string := fault_node.extract('/soap:Fault/faultstring/child::text()',
         'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
    raise_application_error(-20000, fault_code || ' - ' || fault_string);
    END IF;
    END;
    FUNCTION invoke(req IN OUT NOCOPY request,
    url IN VARCHAR2,
    action IN VARCHAR2) RETURN response AS
    env VARCHAR2(32767);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp response;
    BEGIN
    generate_envelope(req, env);
    -- show_envelope(env);
    http_req := utl_http.begin_request(url, 'POST','HTTP/1.0');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml');
    utl_http.set_header(http_req, 'Content-Length', length(env));
    utl_http.set_header(http_req, 'SOAPAction', action);
    utl_http.write_text(http_req, env);
    http_resp := utl_http.get_response(http_req);
    utl_http.read_text(http_resp, env);
    utl_http.end_response(http_resp);
    resp.doc := xmltype.createxml(env);
    resp.doc := resp.doc.extract('/soap:Envelope/soap:Body/child::node()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
    -- show_envelope(resp.doc.getstringval());
    check_fault(resp);
    RETURN resp;
    END;
    FUNCTION get_return_value(resp IN OUT NOCOPY response,
    name IN VARCHAR2,
    namespace IN VARCHAR2) RETURN VARCHAR2 AS
    BEGIN
    RETURN resp.doc.extract('//'||name||'/child::text()',
    namespace).getstringval();
    END;
    END;
    show errors

  • Urgent: Calling web service from PL/SQl fails with XML parsing

    Hi,
    I am trying to call a web service from PL/SQL (using SOAP protocol and UTL_HTTP built in Package).I am using Oracle 9i .I am calling from pl/sql block invoking web service method created in java.
    I am getting the below response object as a SOAP protocol, but i couldn't able to parse the SOAP.
    Could you please provide the values of FirstName, LastName and ErrorDescription
    declare
    request_env varchar2(32767);
    v_xml XMLTYPE;
    l_user_first_name varchar2(100);
    l_user_last_name varchar2(100);
    l_error_value varchar2(100);
    begin
    response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
    <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
    <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
    <axis2ns1:ErrorDescription />
    </UserInfoObjResponse>
    </soapenv:Body>
    </soapenv:Envelope>';
    dbms_output.put_line('Length of Request:' || length(response_env));
    dbms_output.put_line ('Request: ' || response_env);
    v_xml := XMLTYPE(response_env);
    -- SELECT EXTRACTVALUE(v_xml, '//UserInfoObjResponse/FirstName') INTO l_user_fast_name varchar2(100); FROM DUAL;
    dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
    dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
    dbms_output.put_line ('l_error_value: ' || l_error_value);
    end;

    In Oracle 9i:
    SQL> declare
      2    response_env varchar2(32767);
      3    v_xml XMLTYPE;
      4    l_user_first_name varchar2(100);
      5    l_user_last_name varchar2(100);
      6    l_error_value varchar2(100);
      7  begin
      8    response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      9                     <soapenv:Body>
    10                       <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
    11                         <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
    12                         <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
    13                         <axis2ns1:ErrorDescription />
    14                       </UserInfoObjResponse>
    15                     </soapenv:Body>
    16                   </soapenv:Envelope>';
    17
    18    dbms_output.put_line('Length of Request:' || length(response_env));
    19  --  dbms_output.put_line ('Request: ' || response_env);
    20
    21    v_xml := XMLTYPE(response_env);
    22
    23    select EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()') first_name,
    24           EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()') last_name,
    25           EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescription/text()') error_description
    26      into l_user_first_name, l_user_last_name, l_error_value
    27      from dual;
    28
    29    dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
    30    dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
    31    dbms_output.put_line ('l_error_value: ' || l_error_value);
    32  end;
    33  /
    Length of Request:530
    l_user_first_name: First Name Output
    l_user_last_name : Last Name Output
    l_error_value:
    PL/SQL procedure successfully completed.In Oracle 10g:
    SQL> declare
      2    response_env varchar2(32767);
      3    v_xml XMLTYPE;
      4    l_user_first_name varchar2(100);
      5    l_user_last_name varchar2(100);
      6    l_error_value varchar2(100);
      7  begin
      8    response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      9                     <soapenv:Body>
    10                       <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
    11                         <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
    12                         <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
    13                         <axis2ns1:ErrorDescription />
    14                       </UserInfoObjResponse>
    15                     </soapenv:Body>
    16                   </soapenv:Envelope>';
    17
    18    dbms_output.put_line('Length of Request:' || length(response_env));
    19  --  dbms_output.put_line ('Request: ' || response_env);
    20
    21    v_xml := XMLTYPE(response_env);
    22
    23    select r.*
    24      into l_user_first_name, l_user_last_name, l_error_value
    25    from XMLTABLE('/' PASSING v_xml
    26                  COLUMNS
    27                  first_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()',
    28                  last_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()',
    29                  error_description varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescrition/text()'
    30                  ) r;
    31
    32    dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
    33    dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
    34    dbms_output.put_line ('l_error_value: ' || l_error_value);
    35  end;
    36  /
    Length of Request:530
    l_user_first_name: First Name Output
    l_user_last_name : Last Name Output
    l_error_value:
    PL/SQL procedure successfully completed.Max
    http://oracleitalia.wordpress.com
    Edited by: Massimo Ruocchio on Feb 14, 2010 11:55 PM
    Added the first one.

  • Calling web services from PL/SQL

    Hi,
    We have a requirement where we need to call a web services from PL/SQL.
    I believe we have a PL/SQL API that allows you to consume external web services.
    I was looking for other possible options too to consume web Service from PL/SQL.
    Can any one suggest the other possible options , and which option is best to consume web service.
    Thanks
    AB

    AB,
    I didn't realize you cannot attach documents to your post. You will have to provide me with an email address that I can send the documents to. They are a little rough (ie not commented etc) but they do illustrate the point. The basic idea is to build up the payload of the soap envelope using pl/sql. Meaning as I loop through the cursor I use each record in the cursor to build an xml string. This string of xml becomes the payload of the soap message. This could also be done using xml functionality provided by the db meaning xmlelement, xmlforest etc. The issue I ran into was the size of the message. That is why I elected to build the xml message by string concatenation as I moved through the cursor.
    Ryan

  • How to invoke a Web Service from PL/SQL with Complex Type as  input.

    Hello,
    I am trying to invoke a web service from PL/SQL using the UTL_DBWS package.
    The web service expects a complex type as input (defined below):
    <xs:complexType name="MsgType">
    <xs:sequence>
    <xs:element name="sender" type="xs:string"/>
    <xs:element name="messageId" type="xs:string"/>
    <xs:element name="messageType" type="xs:string"/>
    <xs:element name="dateSent" type="xs:date"/>
    </xs:sequence>
    </xs:complexType>
    How to construct input to this in PL/SQL Procedure?
    Has any body tried this before?
    An exmaple will be helpful.
    Thanks

    Dear,
    I have read your article, it is useful for me. But I cannot Apply to my case. Please kindly help me. Thank you.
    When running, the error occurs:
    1:39:31 Execution failed: ORA-20000: soapenv:Server.userException - org.xml.sax.SAXParseException: Attribute name &quot;password&quot; associated with an element type &quot;user&quot; must be followed by the &apos; = &apos; character.
    My webservice Url: http://abc.com.vn:81/axis/ABC_WS_TEST.jws?wsdl
    I make PL/SQL (similiar as your example)
    FUNCTION INVOKESENDMT
    RETURN VARCHAR2
    AS
    l_request soap_api.t_request;
    l_response soap_api.t_response;
    l_return VARCHAR2(32767);
    l_url VARCHAR2(32767);
    l_namespace VARCHAR2(32767);
    l_method VARCHAR2(32767);
    l_soap_action VARCHAR2(32767);
    l_result_name VARCHAR2(32767);
    p_zipcode VARCHAR2(160);
    BEGIN
    --p_zipcode:='''TEST'' ; ''TEST'';''84912187098'';''84912187098'';''0'';''8118'';''1'';''000001'';''ThuNghiem'';''''';
    p_zipcode:='TEST';
    -- Set proxy details if no direct net connection.
    --UTL_HTTP.set_proxy('myproxy:4480', NULL);
    --UTL_HTTP.set_persistent_conn_support(TRUE);
    -- Set proxy authentication if necessary.
    --soap_api.set_proxy_authentication(p_username => 'TEST',
    -- p_password => 'TEST');
    l_url := 'http://abc.com.vn:81/axis/ABC_WS_TEST.jws';
    l_namespace := 'xmlns="' || l_url || '"';
    l_method := 'sendMT';
    l_soap_action := l_url || '#sendMT';
    l_result_name := 'sendMTResponse';
    l_request := soap_api.new_request(p_method => l_method,
    p_namespace => l_namespace);
    soap_api.add_parameter(p_request => l_request,
    p_name => 'user password sender receiver chargedflag servicenumber messagetype messageid textcontent binarycontent',
    p_type => 'xsd:string',
    p_value => p_zipcode);
    l_response := soap_api.invoke(p_request => l_request,
    p_url => l_url,
    p_action => l_soap_action);
    l_return := soap_api.get_return_value(p_response => l_response,
    p_name => l_result_name,
    p_namespace => l_namespace);
    RETURN l_return;
    END;

  • Calling BI Publisher Web Service from pl/sql

    I am trying to call the BI publisher web service from pl/sql.
    I get the following response back
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
    <faultstring>no SOAPAction header!</faultstring>
    <detail>
    <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">my-obiee</ns2:hostname>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    The bit that concerns me is
    <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
    <faultstring>no SOAPAction header!</faultstring>
    The code that I used to call this is
    DECLARE
    req utl_http.req;
    resp utl_http.resp;
    value VARCHAR2(1024);
    p_data_type varchar2(4000):= 'application/soap+xml;';
    p_data_in VARCHAR2(3000) :=
    '<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:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
    <soapenv:Body>
    <pub:scheduleReport xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
    <scheduleRequest>
    <deliveryRequest>
    <ftpOption>
    <ftpServerName>ino-ed-oel2.inoapps.com</ftpServerName>
    <ftpUserName>*******</ftpUserName>
    <ftpUserPassword>*****</ftpUserPassword>
    <remoteFile>/opt/UAT/db/tech_st/11.1.0/employees.pdf</remoteFile>
    </ftpOption>
    </deliveryRequest>
    <reportRequest>
    <attributeFormat>pdf</attributeFormat>
    <reportAbsolutePath>http://10.100.100.44:9704/xmlpserver/~administrator/XXXXXXX.xdo</reportAbsolutePath>
    <parameterNameValues>
    <item>
    <name>dname</name>
    <multiValuesAllowed>false</multiValuesAllowed>
    <values>
    <item>153002</item>
    </values>
    </item>
    </parameterNameValues>
    </reportRequest>
    <userJobName>BILL</userJobName>
    </scheduleRequest>
    <userID>******</userID>
    <password>******</password>
    </pub:scheduleReport>
    </soapenv:Body>
    </soapenv:Envelope>';
    BEGIN
    --utl_http.set_proxy('proxy.my-company.com', 'corp.my-company.com');
    req := utl_http.begin_request('http://10.100.100.44:9704/xmlpserver/services/PublicReportService?wsdl', 'POST');
    utl_http.set_header(req, 'content-type', p_data_type);
    utl_http.set_header(req, 'content-length', length(p_data_in));
    utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
    utl_http.write_text(req, p_data_in);
    resp := utl_http.get_response(req);
    dbms_output.put_line ('status code: ' || resp .status_code);
    dbms_output.put_line ('reason phrase: ' || resp .reason_phrase);
    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;
    Any help would be greatly received

    I had the same problem this morning. You need to add a line to the HTTP header to declare a value for SOAPAction.
    You can set this as an empty string, but for some reason it is required.
    Try adding this among your header declarations:
    utl_http.set_header(req, 'SOAPAction', '');

  • Calling Web Service from PL/SQL (ORA-31011: XML parsing failed)

    hi all,
    i want to invoke a web service from PL/SQL.
    i found a soap_api package from "Tim Hall".
    but it gives error in "ealtas.soap_api.invoke function"
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00007: unexpected end-of-file encountered
    ORA-06512: at "SYS.XMLTYPE", line 48
    ORA-06512: at "EALTAS.SOAP_API", line 135
    ORA-06512: at line 44
    set scan off;
    declare
    P_ADRES_WS VARCHAR2(100) := 'http://<host>:<port>/dswsbobje/qaawsservices/biws?wsdl=1&cuid=AVhBxL14I2dDjz8yFoznRLY';
    P_ENVELOPE VARCHAR2(32767);
    P_FNC VARCHAR2(256) := 'runQueryAsAService';
    ol_req ealtas.soap_api.t_request;
    ol_resp ealtas.soap_api.t_response;
    message varchar2(500);
    BEGIN
    p_envelope := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:db="DB_SUBS_BUDGET">
    <soapenv:Body>
    <db:runQueryAsAService>
    <db:login>DWH_BO</db:login>
    <db:password>Pass1234</db:password>
    </db:runQueryAsAService>
    </soapenv:Body>
    </soapenv:Envelope>
    ol_req := ealtas.soap_api.new_request(P_FNC, 'xmlns="'||P_ADRES_WS||'"');
    ol_resp := ealtas.soap_api.invoke(ol_req, P_ADRES_WS, p_fnc,P_ENVELOPE);
    ealtas.soap_api.show_envelope(p_envelope);
    message := ealtas.soap_api.get_return_value(ol_resp, 'Db_Timeid', 'xmlns:m="'||P_ADRES_WS||'"');
    DBMS_OUTPUT.PUT_LINE('AAAA -'||message);
    end;
    thanks.
    ealtas.

    AlexAnd thanks for your help.
    ACL is ok.
    can you help me about how can i edit this function. i tried many times but i could not do it :( .
    web service url : <host>:<port>/dswsbobje/qaawsservices/biws?WSDL=1&cuid=AVhBxL14I2dDjz8yFoznRLY
    what must be these variables values ?
    l_url :=
    l_namespace :=
    l_method :=
    l_soap_action :=
    l_result_name :=
    this is the xml;
    <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="DB_SUBS_BUDGET" xmlns:tns1="dsws.businessobjects.com" targetNamespace="DB_SUBS_BUDGET" xmlns="http://schemas.xmlsoap.org/wsdl/" name="queryasaservice">
    - <types>
    - <s:schema elementFormDefault="qualified" targetNamespace="DB_SUBS_BUDGET">
    - <s:element name="runQueryAsAService">
    - <s:complexType>
    - <s:sequence>
    <s:element name="login" type="s:string" />
    <s:element name="password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:complexType name="Row">
    - <s:sequence>
    <s:element name="Db_Timeid" type="s:string" nillable="true" />
    <s:element name="Db_Tariff" type="s:string" nillable="true" />
    <s:element name="Grossadds" type="s:double" nillable="true" />
    <s:element name="Cancellations" type="s:double" nillable="true" />
    <s:element name="Netadds" type="s:double" nillable="true" />
    <s:element name="Subs" type="s:double" nillable="true" />
    <s:element name="Churn_P" type="s:double" nillable="true" />
    </s:sequence>
    </s:complexType>
    - <s:complexType name="Table">
    - <s:sequence>
    <s:element name="row" maxOccurs="unbounded" type="s0:Row" />
    </s:sequence>
    </s:complexType>
    - <s:element name="runQueryAsAServiceResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element name="table" type="s0:Table" />
    <s:element name="message" type="s:string" />
    <s:element name="creatorname" type="s:string" />
    <s:element name="creationdate" type="s:dateTime" />
    <s:element name="creationdateformated" type="s:string" />
    <s:element name="description" type="s:string" />
    <s:element name="universe" type="s:string" />
    <s:element name="queryruntime" type="s:int" />
    <s:element name="fetchedrows" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="QaaWSHeader">
    - <s:complexType>
    - <s:sequence>
    <s:element name="sessionID" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
    <s:element name="serializedSession" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </types>
    - <message name="runQueryAsAServiceSoapIn">
    <part name="parameters" element="s0:runQueryAsAService" />
    <part name="request_header" element="s0:QaaWSHeader" />
    </message>
    - <message name="runQueryAsAServiceSoapOut">
    <part name="parameters" element="s0:runQueryAsAServiceResponse" />
    </message>
    - <portType name="QueryAsAServiceSoap">
    - <operation name="runQueryAsAService">
    <documentation>Get Web Service Provider server info</documentation>
    <input message="s0:runQueryAsAServiceSoapIn" />
    <output message="s0:runQueryAsAServiceSoapOut" />
    </operation>
    </portType>
    - <binding name="QueryAsAServiceSoap" type="s0:QueryAsAServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <operation name="runQueryAsAService">
    <soap:operation soapAction="DB_SUBS_BUDGET/runQueryAsAService" style="document" />
    - <input>
    - <soap:header message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal">
    <soap:headerfault message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal" />
    </soap:header>
    <soap:body use="literal" parts="parameters" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    </binding>
    - <service name="DB_SUBS_BUDGET">
    <documentation />
    - <port name="QueryAsAServiceSoap" binding="s0:QueryAsAServiceSoap">
    <soap:address location="http://<host>:<port>/dswsbobje/qaawsservices/queryasaservice?&cuid=AVhBxL14I2dDjz8yFoznRLY&authType=secEnterprise&locale=en_US&timeout=60&ConvertAnyType=false" />
    </port>
    </service>
    </definitions>

  • Create web service from java class in Jdeveloper 11g

    I have very simple java class which I want to expose as a web service. I am using the Jdeveloper's in-built wizard to "Creat Web Service" from a java class. While doing so when I am selecting a method to be exposed as a web service, I get a error pop-up which says "Failed to load system class."
    I am not able to understand the reson for this error. I tried to do this with a very simple java code too but still no luck!!
    Here is the code:
    public class DownloadFileFromECMWrapper {
    public DownloadFileFromECMWrapper() {}
    public static void main(String args[]){
    DownloadFileFromECMWrapper obj = new DownloadFileFromECMWrapper();
    obj.callDownloadFileFromECM("C:\\shivam\\MyFile.txt");
    public String callDownloadFileFromECM(String filePath){
    System.out.println(filePath);
    return filePath;
    Can someone please help me on this.
    Edited by: 962154 on Sep 28, 2012 2:37 PM

    I have very simple java class which I want to expose as a web service. I am using the Jdeveloper's in-built wizard to "Creat Web Service" from a java class. While doing so when I am selecting a method to be exposed as a web service, I get a error pop-up which says "Failed to load system class."
    I am not able to understand the reson for this error. I tried to do this with a very simple java code too but still no luck!!
    Here is the code:
    public class DownloadFileFromECMWrapper {
    public DownloadFileFromECMWrapper() {}
    public static void main(String args[]){
    DownloadFileFromECMWrapper obj = new DownloadFileFromECMWrapper();
    obj.callDownloadFileFromECM("C:\\shivam\\MyFile.txt");
    public String callDownloadFileFromECM(String filePath){
    System.out.println(filePath);
    return filePath;
    Can someone please help me on this.
    Edited by: 962154 on Sep 28, 2012 2:37 PM

Maybe you are looking for

  • How to install the metadata cache invalidation tool

    Hi, I have  a problem in using JCO destinations for Adaptive RFC models. I went through the below pdf and they mentioned metadata cahce invalidation tool and it is not installed in the portal https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/lib

  • Searching from array1 to array2 in the fastest way beside using looping

    I have 2 array 1d of object, what i want to do is searching data "a" from array1 in array2 in the fastest method because the amount of data in each array reached almost 10000 data. thanks.

  • Key Performance Indicators details

    could anyone specify about the details on Key Performance Indicators ,their extraction and other related details

  • Over-riding .LCK files on Inherited Website

    Is there any way of over-riding .LCK files? I've recently been given access to administer a department webpage at a university and defined a site on my computer - but when I accessed the server's directory I found the .htm files have the .LCK extensi

  • Berkeley DB: Too Many Open Files

    I've installed BerkelyDB 6.0.3 on Mavericks but when I try to use it I get errors about there being too many open files: Apr-10-14 11:20:45 [Worker_10001] BerkeleyDB-CRT-ENV-ERROR (1) in HASH Delay , on file /Applications/assp/delaydb.bdb : BDB:Too m