Calling an https web service fro Oracle 9i database

I have seen in OTN as well metalink how to call an external web service
From inside PL/SQL functions. Examples use http URL.
My requirements are however to call a web service using https.
Is it possible to do that in Oracle9i. If yes, how? Any pointers
Will be appreciated.
I have read utl_http package can call https. It seems to require Oracle Wallets (I guess that requires Oracle advanced security option).
I will like to get any pointers to call an https web service within Oracle9i.
I will also like to know options in Oracle10g. Right now, I am only interested in calling an external service and not developing one of my own.
Thanks,

With 10g database, the basic steps were posted in
Re: howto callout with https

Similar Messages

  • How to call a Https Web service client (partner link)

    Hi,
    I am trying to call a https web service and having issues with it. I have copied the server certificate into my JDeveloper truststore as well as into OC4J truststore. I have successfully deployed the application but when I initiate the process and enter input values, it throws the following exception 'Security Requirements not met - No Security header in message'
    <fault>
    - <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    - <part name="code">
    <code>
    Server
    </code>
    </part>
    - <part name="summary">
    <summary>
    Security Requirements not met - No Security header in message
    </summary>
    </part>
    - <part name="detail">
    <detail>
    <detail>
    <ns2:exception xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.wss.XWSSecurityException" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false">
    <message xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">Security Requirements not met - No Security header in message</message>
    <ns2:stackTrace xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient" file="SecurityRecipient.java" line="738" method="createMessage"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient" file="SecurityRecipient.java" line="226" method="validateMessage"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.wss.provider.wsit.WSITServerAuthContext" file="WSITServerAuthContext.java" line="471" method="verifyInboundMessage"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.wss.provider.wsit.WSITServerAuthContext" file="WSITServerAuthContext.java" line="297" method="validateRequest"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.wss.provider.wsit.WSITServerAuthContext" file="WSITServerAuthContext.java" line="211" method="validateRequest"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.webservice.CommonServerSecurityPipe" file="CommonServerSecurityPipe.java" line="168" method="processRequest"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.webservice.CommonServerSecurityPipe" file="CommonServerSecurityPipe.java" line="129" method="process"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.helper.PipeAdapter" file="PipeAdapter.java" line="115" method="processRequest"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="595" method="__doRun"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="554" method="_doRun"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="539" method="doRun"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="436" method="runSync"/
    >
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.server.WSEndpointImpl$2" file="WSEndpointImpl.java" line="243" method="process"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit" file="HttpAdapter.java" line="444" method="handle"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.transport.http.HttpAdapter" file="HttpAdapter.java" line="244" method="handle"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.transport.http.servlet.ServletAdapter" file="ServletAdapter.java" line="135" method="handle"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.webservice.JAXWSServlet" file="JAXWSServlet.java" line="159" method="doPost"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="738" method="service"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="831" method="service"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.ApplicationFilterChain" file="ApplicationFilterChain.java" line="411" method="servletService"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardWrapperValve" file="StandardWrapperValve.java" line="290" method="invoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardContextValve" file="StandardContextValve.java" line="271" method="invokeInternal"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardContextValve" file="StandardContextValve.java" line="202" method="invoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="632" method="doInvoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="577" method="doInvoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.WebPipeline" file="WebPipeline.java" line="94" method="invoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardHostValve" file="StandardHostValve.java" line="206" method="invok
    e"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="632" method="doInvoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="577" method="doInvoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="571" method="invoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.ContainerBase" file="ContainerBase.java" line="1080" method="invoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardEngineValve" file="StandardEngineValve.java" line="150" method="invoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="632" method="doInvoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="577" method="doInvoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="571" method="invoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.ContainerBase" file="ContainerBase.java" line="1080" method="invoke"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.coyote.tomcat5.CoyoteAdapter" file="CoyoteAdapter.java" line="272" method="service"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask" file="DefaultProcessorTask.java" line="637" method="invokeAdapter"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask" file="DefaultProcessorTask.java" line="568" method="doProcess"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask" file="DefaultProcessorTask.java" line="813" method="process"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.DefaultReadTask" file="DefaultReadTask.java" line="341" method="executeProcessorTask"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="c
    om.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask" file="SSLReadTask.java" line="440" method="process"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask" file="SSLReadTask.java" line="228" method="doTask"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.TaskBase" file="TaskBase.java" line="265" method="run"/>
    <ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread" file="SSLWorkerThread.java" line="106" method="run"/>
    </ns2:stackTrace>
    </ns2:exception>
    </detail>
    </detail>
    </part>
    </remoteFault>
    </fault>
    Any help will be appreciated. I am using JDeveloper 10.1.3.3.0.
    Thanks

    Hmm, based on error it looks like service provider expecting some security headers. Are you able to test from other utility soapUI or browser?
    Regards,
    Chintan

  • 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

  • How to call "https" web service from Oracle without certification.

    The reuirement is to call a secured web service (*https web service*) from Oracle9i without involving any additional cost.
    Initialy I tried with UTL_HTTP package but in vain as it is needed some certification. As per the requirement no additional cost should be involved with the implementation.
    So is there any way to achieve the above mentioned problem?
    Please let me know the responses with the sample code/steps.

    Please try not to double post. You have the ability to edit your original thread.
    Oh, BTW, try searching the forum. A quick search turned up this: HTTPS request signed by client certificate from PL/SQL procedure
    Check that out and maybe that will solve your problems.
    Thanks!

  • Calling a HTTPS Web Service through a proxy

    Hi All,
    I am trying to make a web service proxy for a service runnig on the weblogic server over https connection. While I am configuring the proxy I am getting an error saying that Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Tunnel or SSL Forbidden"
    Any ideas why I am getting this or how it can be resolved?
    Thanks in advance

    Hi Sandeep,
    I will add some more details here to add clarity,
    My web service is running over SSL (one-way) on SOA server managed by weblogic server. I am trying to create a proxy for it in jdeveloper. I can access the WSDL document through the browser at the following link:
    https://10.227.32.125:8002/soa-infra/services/default/Test_OWSM_11g/bpelprocess1_client?WSDL
    Now in the second step of creating of proxy (in jdeveloper) i am mentioning the above URL but getting an error saying that no WSDL document found at this location.
    Any ideas where I might be goin wrong

  • Consuming Axis web service from Oracle 10g database

    Greetings,
    I have a working web service that I want my Oracle 10.2 database to consume. I've taken the wsdl file from the web service and run it through Apache Axis' wsdl2java function, thus creating the Java client stubs required.
    Is it possible to:
    -Call a PL/SQL function which:
    --Calls a Java class which:
    ---Calls the webservice which calculates an answer and passes it all the way back to the db?
    I can get the db to call Java functions through PL/SQL and I can call the webservice from Java if I call the Java from the command line, but I can't seem to put it all together. When I upload all my Java to the db and attempt to call the method, I get:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    Java.lang.ExceptionInInitializerError
    If this is possible, could you please give me some direction as to where to go about doing it?
    Thanks.

    Using Axis libraries within the database may not be the easiest way to get started.
    Try this: Calling a Web Service From The Database
    Best,
    -Eric

  • Error while trying to call external  web service from oracle PL/SQL 10.2 g

    Hi I am trying to call an external web service from oracle PL/SQL .I am getting following run time error when I try to set the opeartion style.
    But as per the oracle documentation this is one of the 2 valid values.
    ORA-29532: Java call terminated by uncaught Java exception: operation style: "document" not supported.Teh webservice does expect the operation style as document.
    Following is the code I am executing.
    FUNCTION email
    return varchar2
    AS
    service_ SYS.utl_dbws.SERVICE;
    call_ SYS.utl_dbws.CALL;
    service_qname SYS.utl_dbws.QNAME;
    port_qname SYS.utl_dbws.QNAME;
    operation_qname SYS.utl_dbws.QNAME;
    string_type_qname SYS.utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params SYS.utl_dbws.ANYDATA_LIST;
    l_input_params SYS.utl_dbws.anydata_list;
    l_result ANYDATA;
    l_namespace VARCHAR2(1000);
    begin
    -- open internet explorer and navigate to http://webservices.imacination.com/distance/Distance.jws?wsdl
    -- search for 'targetNamespace' in the wsdl
    l_namespace := 'http://service.xmlservices.global.freedomgroup.com/';
    -- search for 'service name' in the wsdl
    service_qname := SYS.utl_dbws.to_qname(l_namespace, 'ClientCoreWebServiceBeanService');
    -- this is just the actual wsdl url
    service_ := SYS.utl_dbws.create_service(HTTPURITYPE('http://hostname/GlobalWebServices/services/ClientCoreWebService?wsdl'), service_qname);
    -- search for 'portType name' in the wsdl
    port_qname := SYS.utl_dbws.to_qname(l_namespace, 'ClientCoreWebServiceBeanPort');
    -- search for 'operation name' in the wsdl
    -- there will be a lot, we will choose 'getCity'
    operation_qname := SYS.utl_dbws.to_qname(l_namespace, 'postalCodelookup');
    -- bind things together
    call_ := SYS.utl_dbws.create_call(service_, port_qname, operation_qname);
    -- default is 'FALSE', so we make it 'TRUE'
    SYS.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    -- search for 'operation soapAction' under <wsdl:operation name="getCity">
    -- it is blank, so we make it ''
    SYS.utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
    -- search for 'encodingstyle' under <wsdl:operation name="getCity">
    SYS.utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
    -- search for 'binding style'
    SYS.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'DOCUMENT');
    -- search for 'xmlns:xs' to know the value of the first parameter
    -- under <wsdl:message name="getCityResponse"> you will see the line <wsdl:part name="getCityReturn" type="xsd:string" />
    -- thus the return type is 'string", removing 'xsd:'
    string_type_qname := SYS.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    -- in the line <wsdl:operation name="getCity" parameterOrder="zip">
    -- the parameterOrder is 'zip', thus we put in 'zip'
    -- the 'ParameterMode.IN' is used to specify that we will be passing an "In Parameter" to the web service
    -- the 'ParameterMode.IN' is a constant variable in the sys.utl_dbws package
    --vj this cud be either params or xml
    SYS.utl_dbws.add_parameter(call_, 'param1', string_type_qname, 'ParameterMode.IN');
    SYS.utl_dbws.add_parameter(call_, 'param2', string_type_qname, 'ParameterMode.IN');
    SYS.utl_dbws.set_return_type(call_, string_type_qname);
    -- supply the In Parameter for the web service
    params(0) := ANYDATA.convertvarchar('<TFGGlobalBasicXMLDO><systemCd>GLOBAL</systemCd><username>GlobalAdmin</username><password>GlobalAdmin</password><localID>1</localID></TFGGlobalBasicXMLDO>');
    params(1) := ANYDATA.convertvarchar('<TFGGlobalPostalCodeLookupIDDO><postalCode>02446</postalCode><countryCode>USA</countryCode><stateCode>MA</stateCode><cityDisplay>BROOKLINE</cityDisplay><countyDisplay>NORFOLK</countyDisplay><include_inactive_flag>True</include_inactive_flag></TFGGlobalPostalCodeLookupIDDO>');
    -- invoke the web service
    retx := SYS.utl_dbws.invoke(call_, params);
    dbms_output.put_line(retx.gettypename);
    -- access the returned value and output it to the screen
    retx_string := retx.accessvarchar2;
    dbms_output.put_line('done' || retx_string);
    dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
    -- release the web service call
    SYS.utl_dbws.release_service(service_);
    return retx_string;
    end email;

    thsi is urgent anybody ????

  • How to call HTTP web services in an Interactive Form?

    Hi all,
    I am using Adobe Livecycle Designer currently in a trial 8.2 version.
    I need to invoke an HTTP Web Service (non-SOAP) in an Adobe Interactive Form. The Net.HTTP method does not work due to security reasons. The error message I get is:
    (german)
    " NotAllowedError: Sicherheitseinstellungen verhindern den Zugriff auf diese Eigenschaft oder Methode.
    Net.HTTP.request:28:XFA:form1[0]:mysubform[0]:Region[0]:change"
    In english this translates to: "Security settings prohibit the call of this property or method.
    And indeed the "Javascript for Acrobat API reference" includes the following note:
    "Note:This method can only be made outside the context of a document (for example, in a folder level JavaScript)."
    So this method seems to be excluded from use in an Adobe document, e. g. in an interactive form. But why is it then listed at all? Is there a way to call HTTP Web Services in an Adobe Interactive Form by somehow branching out the call outside the document itself? Of course I do not want to call a SOAP service which then calls the HTTP Web Service ;-)
    Is there any other way to invoke HTTP Web Services in an Adobe Interactive Form?
    Thanks a lot for your response!
    Regards
    Christoph

    Hello Kavita,
    patterns are not processed during editing. If you can't use the default behavior of the numeric field when a character is entered (handled when the user finished editing), you could use scripting to process input. Depending on what you want to do you could use the exit event or the change event.
    A change event has a property called "change" that caused the event. You could try "xfa.host.messageBox( upper(event.change) )" in FormCalc to show the characters in upper case.
    But, you should go this way only if the patterns for editing and for display and validation scripts can't be used in your case.
    Best regards
    Juergen

  • Call HTTP Web Service Retries Every 1 Minute

    I currently have a SharePoint 2013 workflow setup. This workflow calls an HTTP Web Service using the HTTP Get Method. The web service takes over a minute to execute what it needs to and respond. The workflow retries calling the web service every 1 minute
    if it doesn't get a response back. This is causing issues as the process is already running and doesn't need to be run again. Is there some setting or response/request header value that I can set to prevent the workflow from retrying the web service call every
    minute?
    Thank You,
    Jon

    Hi,
     As per your posting, I believe there is no direct approach in the workflow to check the web service status for every call. 
    Let me try to work on that and try to give you the appropriate solution.
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever you
    see a reply being an answer to the question of the thread, click "Mark As Answer

  • How to invoke HTTP Web Services in an Adobe Interactive Form

    Hi all,
    I am using Adobe Livecycle Designer stand-alone (without Netweaver integration), currently a trial 8.2 version.
    I need to invoke an HTTP Web Service (non-SOAP) in an Adobe Interactive Form. The Net.HTTP method does not work due to security reasons. The error message I get is:
    (german)
    " NotAllowedError: Sicherheitseinstellungen verhindern den Zugriff auf diese Eigenschaft oder Methode.
    Net.HTTP.request:28:XFA:form1[0]:mysubform[0]:Region[0]:change"
    In english this translates to: "Security settings prohibit the call of this property or method.
    And indeed the "Javascript for Acrobat API reference" includes the following note:
    "Note:This method can only be made outside the context of a document (for example, in a folder level JavaScript)."
    So this method seems to be excluded from use in an Adobe document, e. g. in an interactive form. But why is it then listed at all? Is there a way to call HTTP Web Services in an Adobe Interactive Form by somehow branching out the call outside the document itself? Of course I do not want to call a SOAP service which then calls the HTTP Web Service
    Is there any other way to invoke HTTP Web Services in an Adobe Interactive Form?
    Thanks a lot for your response!
    Regards
    Christoph

    Hi,
    back again, had to handle other issues, sorry.
    Just to get a little more concrete. The condition depends on the context node attributes. So if an attribute is initial, it's field should not been shown, if it's not initial, it should ne shown. There are 6 context attributes and therefore 6 fields in the form. How can I get the attributes' value?
    And can I put them into the same subform or do I have to create 7 (6 conditions + blank-condition) subforms?
    I put the fields (textfield and context node value) that should be shown depending on conditions in a subform. So how can I adress this subform?
    I'm not so familiar with JavaScript, so please help me. I need something like:
    if (context_node_attribute X is initial) {
             subform_1.presence = "hidden" ;
    I tried it with
    if ( ARB_STUNDEN.rawValue != null) {
         Beratungsstunden.presence = "hidden" ;
    but it didn't work....
    Thanks,
    Tan

  • Calling web service from oracle forms 10g

    Problem Description:
    I'm following the steps as per the doc:
    http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html
    to create a java stub to call external web service and then use java importer in oracle forms to call this web service from oracle forms.
    WSDL for external web service used is http://gend:83/DesignService.svc?wsdl
    The service was developed by us.
    Calling the web service using JDeveloper works fine but when I complie in Oracle Forms it returns wrong number of types of arguments in call SENDHELLO.
    The code from oracle form to call web service is as below:
    DECLARE
    jo ora_java.jobject;
    xo ora_java.jobject;
    rv varchar2(2000);
    ex ora_java.jobject;
    str varchar2(100);
    BEGIN
    jo := GendServiceClient.new;
    rv := GendServiceClient.sendHello('Nora');
    EXCEPTION
    WHEN ORA_JAVA.JAVA_ERROR then
    message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
    WHEN ORA_JAVA.EXCEPTION_THROWN then
    ex := ORA_JAVA.LAST_EXCEPTION;
    message(Exception_.toString(ex));
    END;
    Any help/ideas on this is greatly appreciated. Thanks.
    Edited by: KE Nora Loera on Jun 1, 2012 1:24 PM

    My primary skill is PL/SQL but the only information I found on Oracle's site to call a web service from a 10g Form was creating a jar file and importing the java class. Since I don't want to ask our corporate IT to make changes on the UNIX box for the jar files I went a different route.
    I use UTL_HTTP.BEGIN_REQUEST to call a URL then load I load the data to a table as a CLOB since we have more than 4000 characters. Now I need to parse the XML and load it into a form. I have never done this so if there is a helpful site please let me know. I have looked at several sites but none do what I want.
    Thanks

  • Calling web service from oracle forms fails with ORA_JAVA.JAVA_ERROR

    Problem Description:
    I'm following the steps as per the doc:
    http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html
    to create a java stub to call external web service and then use java importer in oracle forms to call this web service from oracle forms.
    WSDL for external web service used is http://www.webservicex.net/CurrencyConverter.asmx?wsdl
    Calling the web service using JDeveloper works fine but from Oracle Forms returns ORA_JAVA.JAVA_ERROR; Unable to call out to Java, Invalid object type for argument 1
    The code from oracle form to call web service is as below:
    DECLARE
    jo ora_java.jobject;
    rv ora_java.jobject;
    ex ora_java.jobject;
    outString varchar2(2000);
    BEGIN
    jo:= CurrencyConvertorStub.new;
    --This will get the exchange rate from US Dollars to UK Sterling.
    rv:= CurrencyConvertorStub.ConversionRate(jo,'CAD','USD');
    message (float_.floatValue(RV));
    EXCEPTION
    WHEN ORA_JAVA.JAVA_ERROR then
    message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
    WHEN ORA_JAVA.EXCEPTION_THROWN then
    ex := ORA_JAVA.LAST_EXCEPTION;
    outString := Exception_.toString(ex);
    message(outString);
    END;
    Any help/ideas on this is greatly appreciated. Thanks.

    Yes, it is the message line - so basically this call fails => rv:= CurrencyConvertorStub.ConversionRate(jo,'CAD','USD'); and control goes in the exception block
    WHEN ORA_JAVA.JAVA_ERROR then
    message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
    Below is the code from java stub that was generated using JDeveloper by using web services stub/skeleton and associating the WSDL
    public Double ConversionRate(String FromCurrency, String ToCurrency) throws Exception
    URL endpointURL = new URL(endpoint);
    Envelope requestEnv = new Envelope();
    Body requestBody = new Body();
    Vector requestBodyEntries = new Vector();
    String wrappingName = "ConversionRate";
    String targetNamespace = "http://www.webserviceX.NET/";
    Vector requestData = new Vector();
    requestData.add(new Object[] {"FromCurrency", FromCurrency});
    requestData.add(new Object[] {"ToCurrency", ToCurrency});
    requestBodyEntries.addElement(toElement(wrappingName, targetNamespace, requestData));
    requestBody.setBodyEntries(requestBodyEntries);
    requestEnv.setBody(requestBody);
    Message msg = new Message();
    msg.setSOAPTransport(m_httpConnection);
    msg.send(endpointURL, "http://www.webserviceX.NET/ConversionRate", requestEnv);
    Envelope responseEnv = msg.receiveEnvelope();
    Body responseBody = responseEnv.getBody();
    Vector responseData = responseBody.getBodyEntries();
    return (Double)fromElement((Element)responseData.elementAt(0), java.lang.Double.class);
    }

  • Call a web services from oracle forms 10

    I have to call a web services from oracle forms.
    The version of the database is oracle 11gr2. the version of the forms is 10.1.2.0.2.
    I allready did the proxy creation and the import class within forms.
    I have 2 questions:
    1.
    I created the following procedure:
    PROCEDURE call_WS IS
         vobject1 ORA_JAVA.JOBJECT;
         vobject2 ORA_JAVA.JOBJECT;
    BEGIN
    vobject1 := WSEvaluarReglaCondicionComerci.new();
    vobject2 := WSEvaluarReglaCondicionComerci.listarValoresAtributoEvento(vobject1, 702, 2217, null, null, null);
    END;
    the function I calling:
    FUNCTION listarValoresAtributoEvento(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT,
    a1 ORA_JAVA.JOBJECT,
    a2 ORA_JAVA.JOBJECT,
    a3 VARCHAR2,
    a4 ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT;
    Note that the parameters is ORA_JAVA_JOBJECT and I need to send numbers. I understand that when I import the classes, because in the WS those parameters are defined as BigDecimal, Forms understand them as java object but when I compile it reports the error: "numero o tipo de argumento erroneo al llamar..." type error.
    So the question is, how Cast the numbers to Java Object to send them.
    I have read in a web page that one option is to change in the web service the type of the parameters but that is not an option.
    2.
    The WS returns a super big XML as answer, so how I can parse the result into an Object type?...
    The object structure is:
    TYPE opciones_obj AS OBJECT
    (strindice VARCHAR2 (4000),
    nombrecompleto VARCHAR2 (4000),
    nombre VARCHAR2 (4000),
    strtipodato VARCHAR2 (4000),
    codigoopcion NUMBER,
    floatval FLOAT,
    strtipo VARCHAR2 (4000),
    strval VARCHAR2 (4000));
    and the tags to extract is:
    COLUMNS strindice VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="strIndice"]/ns2:value',
    nombrecompleto VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="nombreCompleto"]/ns2:value',
    nombre VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="nombre"]/ns2:value',
    strtipodato VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="strTipoDato"]/ns2:value',
    codigoopcion NUMBER
    PATH 'ns2:mapEntry[ns2:key="codigoOpcion"]/ns2:value',
    floatval FLOAT
    PATH 'ns2:mapEntry[ns2:key="floatVal"]/ns2:value',
    strtipo VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="strTipo"]/ns2:value',
    strval VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="strVal"]/ns2:value') x;
    xquery / xmltype aparently is not an option because the xml is too big.
    I will appreciate your answers.
    Thanks.
    Edited by: user13058213 on 26-ene-2012 16:02

    i created jar file to call it from forms
    Could you be a little bit less vague about what you exactly did?
    Anyway; see here http://bit.ly/10VVoMR
    cheers

  • Calling web service from oracle application framework r12

    Hi Techies
    Is anybody know How to call web service from oracle application framework r12(step by step procedure),because i searched in net but i could not understand that one
    Thanks
    Dillibabu B
    Edited by: 962005 on 28 Sep, 2012 12:11 AM

    Hi,
    Check below links:
    http://oracle.anilpassi.com/oa-framework-with-captcha-webservice.html
    http://oracle.anilpassi.com/integrate-oa-framework-with-web-service.html
    https://blogs.oracle.com/ebusinesssuiteintegration/entry/r121_-invokingweb_service_fr
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Configuring SSL to make a HTTPS web Service call from XI

    Hi All,
    We are making a <b>https web service call</b> using soap adapter from XI. Looking at the various posts and SAP help links, we are configuring SSL for the same.
    The procedure given in SAP help has been followed to configure SSL but with no luck. If someone had done this could you please give a <b>step by step procedure</b> to configure SSL, we might have missed out on something.
    Also are there are <b>any other settings apart from SSL</b> to be done to make a  https web service call using soap adapter from XI.
    Cheers,
    Chandra

    user13046122 wrote:
    I have an old pl/sql "helper" package, originally written to make SOAP Web Service calls from the database - it uses UTL_HTTP to invoke the target services.
    I now need to make SOAP Web Service calls - from an 8.1.7.4 database
    But the version of UTL_HTTP inside 8.1.7.4 does not contain the functions needed in the helper package
    Can anybody suggest a means of making SOAP Web Service calls from an 8.1.7.4 database ?I think you'll be very lucky to find anyone here who still has access to a version of Oracle that is that old.... I mean... that's like what? 15 years old at least? I'm surprised you've still got hardware that can run that.
    It would probably help if you could post what code you've got and explain which function(s) it's complaining about, as I doubt people will want to guess.

Maybe you are looking for

  • ITunes match isn't working with new Macbook Pro

    Hello everyone, I have had iTunes Match for years with no problems on any device mobile or otherwise. I just purchased a new Macbook Pro w/Retina. I unboxed, powered up, and updated all software. I set up the Macbook with my one and only apple ID and

  • Set Desname for PDF using Oracle Applications

    We are running Oracle Applications 11i, 8i database on a Unix box and use windows 2000, internet explorer, acrobat 6.0 to run, and view the reports. I just finished redesigning a Oracle report to output to PDF instead of printing on a preprinted form

  • BAPI/FM for Payment Praposal F110S

    Hi Expert, I am looking for  any bapi or fm which can create the payment praposal (FS110S). Please can anyone let me know.... I am in a great need of the same.. Thanks in advance. ~~N

  • Can I make iMovie theatre videos appear in my macs iCloud folder?

    Hi - is it possible to make my iMovie theatre videos appear in my macs iCloud folder?  Also, is there any way of doing this on iOS? I don't particularly need iMovie on my phone but would like to be able to access my movies thanks! N

  • Req Help to Update LIKP-LIFSK,Delivery Header block through custom program.

    Hi everyone, Can you please suggest a FM or BAPI to update the delivery header block field, LIFSK, in LIKP table through FM or a BAPI. I tried using 'BAPI_OUTB_DELIVERY_CHANGE' as below to update the LIKP-LIFSK, but it is not working. DATA : ls_likp