Calling Webservice from Pl/sql

Hi All,
Can any one give me a detailed example, to call a web service from a pl/sql package. preferably by POSt method.
Thank you!

check this out for some ideas: http://www.bloggingaboutoracle.org/archives/calling-web-services-from-plsql

Similar Messages

  • Calling Webservices from Oracle PL/SQL

    Hi,
    I am trying to call a webservice from PL/SQL using Oracle-10g database.
    I am getting the error at the line ::
    http_req:=utl_http.begin_request(p_url,'POST','HTTP/1.0');
    p_url parameter is populated with the corresponding correct url.
    ERROR ::
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1029
    ORA-12541: TNS:no listener
    However my application is runing fine in the server and from Toad/SQL plus I am able to connect to the database.
    From outside also , the webservices are working. Please help me to solve this problem.
    - Thanks
    Sandipan

    You're probably behind a firewall and need to set a proxy server in the database.
    You can do this by adding the following code (of course before you make a call to the SOAP request)
    utl_http.set_proxy('yourproxy.yourcompany.com', NULL);

  • Calling WS from PL/SQL using WS-security

    Hi All,
    Has anyone experience with calling a Webservice from PL/SQL and use WS-security to encrypt the contents? If not; maybe with java stored procedures in 9i? (in other words: using WS-security without JDeveloper).
    with regards,
    Michiel Kuperus

    Right now what you can do is use SSL via the Java stack calling Web services ... the "call out" examples at:
    http://otn.oracle.com/tech/webservices/database.html
    show how under a PL/SQL wrapper the same java web services runtime from the middle tier running in the DB can invoke Web services. That stack supports SSL. It does not currently support WS-Security which is an emerging spec from the OASIS standards body.
    Oracle, however, is currently working on building WS-Security into its Web services stack. This is however,a post-9.0.4 (the upcoming release of Oracle9iAS) project. Bear in mind that WS-Security is still an evolving standard and while there are some early implementations they will evolve over time as the spec itself solidifies.
    Mike.

  • XML Error while calling webservice from oracle function.

    I am getting an error while I am trying to call webservice from oracle function. Any ideas? Thanks.
    select get_new_string ('proxy:80', 'http://xxx/PatternVariations/SourceTest/WebMethods','Scott') from dual
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00225: end-element tag "H4" does not match start-element tag "P"
    Error at line 9
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at "DORSBP00.DEMO_SOAP", line 82
    ORA-06512: at "DORSBP00.GET_NEW_STRING", line 11

    The error message implies that the web service is returning something that is not well formed xml. Can you verify what is being returned by the web service call

  • Call webservice from PJC over https protocol

    Hello!
    I have problem calling webservice from PJC.
    The webservice is on https server so I must declare the keystore and truststore...
    I have generated java classes from wsdl file with SOPAUI and axis 1.0...
    Then I have made a code which integrate axis library, jsee ...
    On the client side all works fine (with jdk 1.3 compiler)
    When I deploy it on oracle forms server and call it from oracle form I get the error:
    java.net.MalformedURLException: unknown protocol: https
    in this way I register the certificate..
    private void registrirajCertifikat(String direktorij, String password,
            String keyStore, String trustStore) {
           System.out.println("keystore: " + direktorij + keyStore);
            System.out.println("trust: " + direktorij + trustStore);
            System.out.println("========================================");
            System.setProperty("javax.net.ssl.keyStore", direktorij + keyStore);
            System.setProperty("javax.net.ssl.keyStorePassword", password);
            System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
            System.setProperty("javax.net.ssl.trustStore", direktorij + trustStore);
            System.setProperty("javax.net.ssl.trustStorePassword",   password);
            System.setProperty("javax.net.ssl.trustStoreType", "jks");
            System.out.println("========================================");
            System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
            Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider() );     
        }I have my kestore and truststore located on http server..
    Every time the bean is initializzed I download the keystore and truststore to my java.tmp.dir
    The same code in Jdeveloper works fine.. also in cmd prompt.. but in oracle forms I can't get it to run..
    anybody can help me?
    this is my console output when running a form:
    Oracle JInitiator: Version 1.3.1.22
    Using JRE version 1.3.1.22-internal Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\peterv.IN2SLO
    Proxy Configuration: no proxy
    JAR cache enabled
         Location: C:\Documents and Settings\peterv.IN2SLO\Oracle Jar Cache
         Maximum size: 50 MB
         Compression level: 0
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    q:   hide console
    s:   dump system properties
    t:   dump thread list
    x:   clear classloader cache
    0-5: set trace level to <n>
    Loading http://dekani:7777/forms/java/frmall_jinit.jar from JAR cache
    Loading http://dekani:7777/forms/java/images.jar from JAR cache
    Cached copy of http://dekani:7777/forms/java/in2kartica.jar
    ** DOKUMENTNI SISTEM   **
    ** PJC bean                     **
    zacetek
    http://10.1.2.235/in2/asarh.pfx
    Copying resource (type: application/octet-stream, modified on: Dec 18, 2009 12:39:35 PM)... to: C:\DOCUME~1\PETERV~1.IN2\LOCALS~1\Temp\asarh.pfx
    3794 byte(s) copied
    http://10.1.2.235/in2/arhaskeystore.jks
    Copying resource (type: application/octet-stream, modified on: Dec 18, 2009 12:39:35 PM)... to: C:\DOCUME~1\PETERV~1.IN2\LOCALS~1\Temp\arhaskeystore.jks
    3800 byte(s) copied
    Registriramo nastavitve za SSL
    keystore: C:\DOCUME~1\PETERV~1.IN2\LOCALS~1\Temp\asarh.pfx
    trust: C:\DOCUME~1\PETERV~1.IN2\LOCALS~1\Temp\arhaskeystore.jks
    ========================================
    po registraciji nastavitev za SSL
    ========================================
    https://hosting.arhiviraj.si/webservice2/InDocArchiveWS.asmx
    --> napaka: *java.net.MalformedURLException: unknown protocol: https*
    java.net.MalformedURLException: unknown protocol: https
         at java.net.URL.<init>(Unknown Source)
         at java.net.URL.<init>(Unknown Source)
         at java.net.URL.<init>(Unknown Source)
         at in2.mikrocop.Test.dokumenti(Test.java:94)
         at in2.mikrocop.Test.testiranje(Test.java:66)
         at in2.mikrocop.Test.<init>(Test.java:49)
         at java.lang.Class.newInstance0(Native Method)
         at java.lang.Class.newInstance(Unknown Source)
         at oracle.forms.ui.VBean.instantiateBean(Unknown Source)
         at oracle.forms.ui.VBean.setProperty(Unknown Source)
         at oracle.forms.handler.UICommon.instantiate(Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    I have tryed tu run my example with Jinitiator "java" like
    c:\java -jar c:\in2kartica.jar
    and all works fine..
    I don't know why the same example won't run inside oracle form as javabean?!?
    this is my cmd console
    C:\jdk\bin>java -jar c:\in2kartica.jar
    ** DOKUMENTNI SISTEM   **
    ** PJC bean            **
    keystore: C:\DOCUME~1\PETERV~1.IN2\LOCALS~1\Temp\asarh.pfx
    trust: C:\DOCUME~1\PETERV~1.IN2\LOCALS~1\Temp\arhaskeystore.jks
    ========================================
    po registraciji nastavitev za SSL
    ========================================
    https://hosting.arhiviraj.si/webservice2/InDocArchiveWS.asmx
    unknown attr1.3.6.1.4.1.311.17.1
    Dolzina: 91  <------------ this is the result from webservice located on address above

  • Call Webservice from Bridge

    Hi
    I need to create a palette in bridge which will interact with webservice and create a treeview. I do not know how to call webservice from adobe bridge. Can anybody help me?

    Hi
    I need to create a palette in bridge which will interact with webservice and create a treeview. I do not know how to call webservice from adobe bridge. Can anybody help me?

  • Related documents or links on how to call webservices from WDJ

    Hi all
    i need documents & links on how to call webservices from Webdynpro for Java.
    if anybody send the documents on sample scenarios on the same then it is the great help to me...
    Thanks
    Sunil

    Hi Sunil,
    May these links help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/f7/f289c67c759a41b570890c62a03519/frameset.htm
    http://help.sap.com/saphelp_nwce10/helpdata/en/64/0e0ffd314e44a593ec8b885a753d30/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/d2/0357425e060d53e10000000a155106/frameset.htm
    and  the below thread to call weservices in java.
    Re: How to call a web service from Java
    Regards,
    Supraja

  • How to call webservices from ADF page

    Hi,
    I am using ADFBC.
    I want to call webservices from ADF page.please give examples of sample program on how to call a web service from the ADF pages.please give examples.
    please help me.
    Thanks,

    http://marianne-horsch-adf.blogspot.com/2011/03/how-to-create-web-service-based-adf.html
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/70-dependent-listboxes-using-ws-286107.pdf
    http://www.oracleimg.com/technetwork/developer-tools/jdev/adfcomplexwstypes-101013.html
    http://technology.amis.nl/blog/9726/quickly-creating-reploying-and-testing-a-webservice-interface-for-adf-business-components
    http://oracamp.com/passing-parameters-between-web-services-and-jsf-pages

  • Is it possible to call Webservice from VB 6.0?

    Is it possible to call Webservice from VB 6.0?
    Regards,
    Krishanu ray

    Hi
    Please check following links.
    Calling Web Services from Visual Basic 6, the Easy Way
    SAP PI integration with VB 6.0
    Thanks,
    Dipak Patil

  • Calling webservice from Flex?

    Hi,
    I get the error when I call webservice from Flex.Can you tell
    me why this happen?
    Thanks
    Mark
    [RPC Fault faultString="Security error accessing url"
    faultCode="Channel.Security.Error" faultDetail="Destination:
    DefaultHTTP"]
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::faultHandler()
    at mx.rpc::Responder/fault()
    at mx.rpc::AsyncRequest/fault()
    at DirectHTTPMessageResponder/securityErrorHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/redirectEvent()

    I think this means that the source of the web service does
    not have a crossdomain.xml file on it allowing access from your
    site. Try adding one to the root of the server and see if that
    fixes the problem.
    hth,
    matt horn
    flex docs

  • Calling webservices from ABAP via https/ssl with p12 certificates.

    Hi all,
    I have a problem with calling an external webservice via HTTPS.
    I configured my system as indicate in the blog /people/jens.gleichmann/blog/2008/10/31/calling-webservices-from-abap-via-httpsssl-with-pfx-certificates but when I check the RFC connection the result is: ICM_HTTP_SSL_ERROR.
    I check the ICM monitor and this is the result:
    [Thr 11] Thu May 26 16:02:57 2011                                                                               
    [Thr 11] *** ERROR during SecudeSSL_SessionStart() from SSL_connect()==SSL_ERROR_SSL                                           
    [Thr 11]    session uses PSE file "/usr/sap/SV5/DVEBMGS10/sec/SAPSSLHTTPS1.pse"                                                
    [Thr 11] SecudeSSL_SessionStart: SSL_connect() failed                                                                          
      secude_error 536875072 (0x20001040) = "received a fatal SSLv3 handshake failure alert message from the peer"                 
    [Thr 11] >>            Begin of Secude-SSL Errorstack            >>                                                            
    [Thr 11] WARNING in ssl3_read_bytes: (536875072/0x20001040) received a fatal SSLv3 handshake failure alert message from the peer
    WARNING in ssl3_output_cert_chain: (12354/0x3042) No hierarchy certificate in FCPath                                           
    WARNING in reduce_FCPath_by_Issuer: (12354/0x3042) No hierarchy certificate in FCPath                                          
    [Thr 11] <<            End of Secude-SSL Errorstack                                                                            
    [Thr 11]   SSL_get_state() returned 0x000021d0 "SSLv3 read finished A"                                                         
    [Thr 11]   Server's List of trusted CA DNames (from cert-request message):                                                     
    [Thr 11]     #1  " certificate 1
    [Thr 11]     #2  " certificate 2
    [Thr 11]   SSL NI-sock: local=ip  peer=ip2                                                       
    [Thr 11] <<- ERROR: SapSSLSessionStart(sssl_hdl=6000000000652010)==SSSLERR_SSL_CONNECT                                         
    [Thr 11] *** ERROR => IcmConnInitClientSSL: SapSSLSessionStart failed (-57): SSSLERR_SSL_CONNECT [icxxconn_mt.c 2012]
    SAP_ABA     700     0012     SAPKA70012     Componenti validi per tutte le applicazioni
    SAP_BASIS     700     0012     SAPKB70012     Componenti di base SAP
    PI_BASIS     2005_1_700     0012     SAPKIPYJ7C     PI_BASIS 2005_1_700
    ST-PI     2008_1_700     0001     SAPKITLRD1     SAP Solution Tools Plug-In
    SAP_BW     700     0013     SAPKW70013     SAP NetWeaver BI 7.0
    SAP_AP     700     0010     SAPKNA7010     Piatt. d'applicazione SAP
    CCM     200_700     0010     SAPK-27010INCCM     CCM 200_700 : Add-On Supplement
    SRM_PLUS     550     0010     SAPKIBK010     SRM_PLUS per mySAP SRM
    SRM_SERVER     550     0010     SAPKIBKT10     SRM_SERVER
    BI_CONT     703     0001     SAPKIBIIP1     Contenuto Business Intelligence
    ST-A/PI     01L_BCO700     0000          -     Servicetools for other App./Netweaver 04
    What do you think about it?
    Best regards,
    Norberto.

    Don´t forget to set your proxy settings! Be sure that the application server could establish a connection to the external server.
    From the BLog.
    Thr 11 WARNING in ssl3_read_bytes: (536875072/0x20001040) received a fatal SSLv3 handshake failure alert message from the peer
    From the Error.
    Have you looked into the above details?
    Thanks
    SM

  • Is posible call WebServices from Forms???

    Hi.
    My cuestion is simple. I don´t found information about this.
    Can I call webservices from a Forms???. If it´s possible how it is??.
    I don´t find anything document.
    Thanks and sorry for my english.

    Hi!. thnaks for response.
    The version is Forms 11g.
    FormsEleven thaks!! !!
    The webService are in .Net C# in a IIS. There is some problem???.
    Edited by: Adama on 30-ago-2010 14:33

  • Advantages and Disadvantages of calling java from PL/SQL

    Hi,
    I have one doubt. What are all the advantages and disadvantages of the calling java from PL/SQL?
    In actual scenario the java program will be in the Application server side. It will do the operation and it will store the result in Data base. But in this case (calling java from PL/SQL), we are loading the java program in the Data base and it is doing the operations.
    I have seen many posts are coming regarding loading jar files into the database. Actually the jar will deploy in to Application server. Is there any difference instead of keeping in the Application server side?
    Then I have read,
    advantages:
    -> java having lot API's. so PL/SQL can use that API's.
    -> if we can not do anything in PL/SQL. we can do it using this mtd(calling java from PL/SQL).
    My questions:
    -> could you explain what are all the things we can not do but we can do using "calling java from PL/SQL" method?
    -> is there any other advantages?
    Disadvantages:
    -> the performance is very slow in calling java from PL/SQL.
    My questions:
    -> Then why others are loading java files and jar files into database?
    -> is there any other disadvantages?
    Could you explain about this one? It will be more helpful to others also…
    Regards,
    kk

    Hi,
    You can read the free first chapter of my book @ http://www.amazon.com/gp/product/1555583296/ (see details then Excerpt)
    Kuassi http://db360.blogspot.com

  • Call php from PL/SQL

    Hello !
    i want to call PHP from PL/SQL(procedure).
    Is it possible .
    If yes then how.
    if no then is there any other way to do it.
    Regards
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Michael Kleiser ([email protected]):
    Look at this: http://www.oracle.com/oramag/code/tips2001/index.html?021201.html
    It`s a java-function which calls a os-command.
    I haven4t testet it.
    In this forum http://www.dbasupport.com/forums/showthread.php?threadid=3703
    someone asked the same question as you.
    I hope this helps you.<HR></BLOCKQUOTE>
    I've tried the tip above without success. Has anyone got it to work?
    null

  • Problem calling WebService from Oracle Forms created by JDeveloper

    Hi All,
    I am trying to call a Webservice from Oracle Form using JAVA Class created by Oracle JDeveloper.
    The Java Function (in JDeveloper) is as follows:
    public Vector GetPIValue(String TagName, String ReadingTime) throws Exception
    URL endpointURL = new URL(endpoint);
    Envelope requestEnv = new Envelope();
    Body requestBody = new Body();
    Vector requestBodyEntries = new Vector();
    requestBodyEntries.addElement(TagName);
    requestBodyEntries.addElement(ReadingTime);
    requestBody.setBodyEntries(requestBodyEntries);
    requestEnv.setBody(requestBody);
    Message msg = new Message();
    msg.send(endpointURL, "http://tempuri.org/GetPIValue", requestEnv);
    Envelope responseEnv = msg.receiveEnvelope();
    Body responseBody = responseEnv.getBody();
    return responseBody.getBodyEntries();
    When this Class is Imported into Oracle Forms the Function is converted into the following PL/SQL code:
    FUNCTION GetPIValue(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2,
    a1 VARCHAR2) RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    Message('param passed: '||a0||' - '||a1);
    cls := JNI.GET_CLASS('oracle/forms/demos/webservice/ConnectToPIStub');
    mid := JNI.GET_METHOD(FALSE, cls, 'GetPIValue', '(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;');
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    Message('I am Here');
    RETURN JNI.CALL_OBJECT_METHOD(obj, mid, args);
    END;
    When I am calling this Function from Within Forms and Passing into it the Parameters, I am displaying some Debugging Messages. When the Code reaches "JNI.CALL_OBJECT_METHOD" there is NO RESPONSE from the Webservice and nothing is moving forward after this Point...
    A similar Webservice that can be Tested is:
    http://www.webservicex.com/CurrencyConvertor.asmx
    with WSDL file:
    http://www.webservicex.com/CurrencyConvertor.asmx?wsdl
    Kindly note that this Webservice is running properly from the Web Browser but the call from Oracle Forms is not Succeeding!!!! :-((
    Any help is much appreciated.
    Regards,
    Baz

    Hi,
    Yes, you need to compile your source files with JDK 1.3 (since JInit 1.3.x.x uses JDK 1.3).
    Other solution would be to use JRE 1.5 (instead of JInitiator).
    Check out [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=550563] on how to use JRE1.5
    -Arun

Maybe you are looking for

  • Admin Needed Please

    So last year my Apple ID account for the forums was stuck in this vicious bug loop on the Apple website.  So I created a new forum Apple ID with a different email address and posted my problem which you can find here. Now that I am able to get back i

  • How do youi call an EJB from a composite app

    I created a simple composite application, called testserve. Here is the entire body of the implementation class, testserveBeanImpl.java package com.sap.demo.testserve.modeled.appsrv.testserve; import com.sap.demo.*; @com.sap.caf.dt.CAFWebService(name

  • Entity Beans

    Hi, I am new to the EJB technology. I want to run an example for a Bean Managed Persistence. With out using any deployment tool, i would like to create the xml files and run a buil.cmd which contains the steps for deployment. Please let me know how t

  • Gmail 'All mail' listed for every message in smart folders

    With the new Gmail integration, every one of my smart folder message lists show each message as being in 'All mail'.  While this is true, I'd much prefer it if it showed me any *other* folders/tags the message is part of, which is much more interesti

  • OFFICIAL APPLE INFORMATION ABOUT COMPATIBILITY WITH EXPLORER

    Hi,I have problems with incompatibility with IE 6+7. In my coutry is 80% people on IE. Every schools, iCaffe etc.Is very, very big problem with iWeb'08 - I make a lot of job but after this is result..........incompatible.Is some OFFICAL INFORMATION F