Calling a Web Service from Oracle Stored procedure

I am getting the following error when running this example. Does anyone know what did I miss.
Error: HTTPClient.HTTPConnection java.lang.NoClassDefFoundError: HTTPClient.HTTPConnection at oracle.soap.transport.http.OracleSOAPHTTPConnection.getHTTPConnection(Ljava.net.URL;)LHTTPClient.HTTPConnection;(OracleSOAPHTTPConnection.java:1122) at oracle.soap.transport.http.OracleSOAPHTTPConnection.post(Ljava.net.URL;Lorg.apache.soap.transport.TransportMessage;)Lorg.apache.soap.transport.TransportMessage;(OracleSOAPHTTPConnection.java:877) at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(Ljava.net.URL;Ljava.lang.String;Ljava.util.Hashtable;Lorg.apache.soap.Envelope;Lorg.apache.soap.encoding.SOAPMappingRegistry;Lorg.apache.soap.rpc.SOAPContext;)V(OracleSOAPHTTPConnection.java:713) at org.apache.soap.rpc.Call.invoke(Ljava.net.URL;Ljava.lang.String;)Lorg.apache.soap.rpc.Response;(Call.java:253) at oracle.otnsamples.wsclient.CreditAgencyServiceStub.authorizeCustomer(Ljava.lang.String;)Ljava.lang.String;(Unknown Source) at jsp_servlet.__products._jspService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(__products.java:191) at weblogic.servlet.jsp.JspBase.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:971) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:402) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:305) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6350) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:317) at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3635) at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2585) at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170) at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
Thanks
Sanjeev

Sanjeev,
I don't have an answer for you, just a couple of suggestions.
1. Have you tried the Sample Code?
2. Use the [ code ] and [ /code ] tags (without the spaces, of-course) to format your stack trace ...
like this!Good Luck,
Avi.

Similar Messages

  • 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

  • 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 a web Service from Oracle Applications?

    Hi friends,
    I've posted this question on OA Framework forum , but may be it's more appropiated put it here. Sorry for do it again:
    It's about how to call a web service from a Form or a .sql (via Request) in Oracle Applications:
    Could you please explain here the detailed steps (with code example if it's possible) to invoke a webservice from Oracle Applications?.. how did yo do it...?
    I've read differents posts here and the 33097.1 metalink note (by the way, the first recommended link in this note is broken...), but there are lots of theorical concepts and no real examples to see how/from where invoke the WS
    I'll have to call one webservice (I suppose the customer will give me the interface implementation)...but I've never did it with Applications so that's why I ask you for all the detailed steps...
    I work with Forms 6i, Apps 11.5.10.2 and DB 9.2.0.7.
    Thanks a lot.
    Jose.

    Hello Jose,
    I did using java program to call BPEL web services in 11.5.10.
    I pasted below the metalink note for your reference (Note:250964.1)
    The idea is first write a java program to call the webservice (in my case it is calling an BPEL web service, so this may not help directly), test it.
    Then port the java program as specified in the note, so that you could call your web service through concurrent manager scheduler.
    Is this ok?
    Thanks
    Arun.
    ======================================================
    Checked for relevance on 25-Apr-2007
    Application Install - Version: 11.5.8 to 11.5.10
    Goal
    ====
    How to register and create a Java concurrent program for Oracle Applications
    Release 11i
    Solution
    ========
    1. Create your Java Concurrent Program (JCP) , using a text editor.
    /*===========================================================================+
    | Concurrent Processing Sample Code |
    | |
    | FILENAME |
    | Hello.java |
    | |
    | DESCRIPTION |
    | Sample Java concurrent program |
    | About the simplest possible program, just writes a message to the |
    | logfile and output file. |
    | |
    | HISTORY |
    | $Log$ |
    | |
    +===========================================================================*/
    package oracle.apps.fnd.cp.sample;
    import oracle.apps.fnd.cp.request.*;
    public class Hello implements JavaConcurrentProgram {
    public static final String RCS_ID = "$Header$";
    public void runProgram(CpContext ctx) {
    ctx.getLogFile().writeln("-- Hello World! --", 0);
    ctx.getOutFile().writeln("-- Hello World! --");
    ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
    =======================================
    End Sample
    =======================================
    2. Create a sample directory under $JAVA_TOP:
    $ mkdir $JAVA_TOPoracle/apps/fnd/cp/sample
    3. Copy Hello.java into $JAVA_TOP/oracle/apps/fnd/cp/sample:
    $ cp $HOME/Hello.java $JAVA_TOP/oracle/apps/fnd/cp/sample
    4. Compile your java program:
    javac $JAVA_TOP/oracle/apps/fnd/cp/sample/Hello.java
    5. Test at the command line with following syntax:
    jre -Ddbcfile=$FND_TOP/secure/your_dbc_file.dbc \
    -Drequest.outfile=./outfile \
    oracle.apps.fnd.cp.request.Run \
    oracle.apps.fnd.cp.sample.Hello
    6. Register your custom java concurrent program with Oracle Applications.
    a. Navigate: Concurrent > Program > Executable
    b. Enter details into the form
    Executable: JCPHELLO
    Shortname: JCPHELLO
    Application: Application Object Library
    Execution Method: Java Concurrent Program
    Execution File Name: Hello (Insert a name that does not contain space or period)
    Execution File Path: oracle.apps.fnd.cp.sample
    c. Save the details
    d. Navigate: Concurrent > Program > Define
    e. Enter details into the form
    Program Name: JCPHELLO
    Program Shortname: JCPHELLO
    Application: Application Object Library
    Executable: Choose JCPHELLO from LOV
    Executable Options :
    f. Save the details
    7. Add this new concurrent request to your responsibility request group.
    a. Navigate > Security > Responsiblity > Request
    b. Query System Administrator
    c. Add new row and choose TestJava
    d. Save the changes.
    8. Run your new Hello Java Concurrent Program
    Navigate: Request > Run
    References
    ~~~~~~~~~~~
    Oracle Applications Developers Manual for Release 11i A75545-01
    ====================================================

  • Calling a Web Service from PL/SQL Procedure

    How can you call a web service from a pl/sql package , also is it valid to call a web service from pl/sql according to Fusion Standards..

    Hi,
    On way we can call a web service is to pass the Web Service URL to UTL_HTTP package:
    Sample Web Service URL
    ===================
    lv_url :=
    'http://67.97.189.151:8888/plsqlsample/dbfunc?invoke=placeOrder'
    || '&'
    || 'param0=1'
    || '&'
    || 'param1=1'
    || '&'
    || 'param2=1';
    Sample Call using UTL_HTTP
    =====================
    SELECT UTL_HTTP.request (lv_url)
    INTO lv_result
    FROM DUAL;
    Thank you.
    Regards,
    Balu

  • Calling unix shell script from oracle stored procedure.. urgent!!!!!!!!!!!!

    Hi,
    i havea requirement where in i should be able to call my shell script through oracle stored procedure.i tried the following way..but iam unable to get the result.please find the details below.
    new.sh - my shell script - lctfile (LCTFILE) is the input pa
    v_config_file=`find $FND_TOP -name LCTFILE
    FNDLOAD apps/s0ccer@$dxbs1 0 Y DOWNLOAD $v_config_file /home/bir4163/RPT33/bin/menu.ldt MENU MENU_NAME='AR_NAVIGATE_GUI'
    if [ $? != 0 ];then
    echo "$DATE $0 FNDLOAD DOWNLOAD Failed!" | tee -a $LOG_FILE
    else
    echo "SUCCESS" | tee -a $LOG_FILE
    fi
    CREATE OR REPLACE PROCEDURE test_dbms_scheduler
    AS
    v_text VARCHAR2 (255) := 'AR_NAVIGATE_GUI';
    BEGIN
    DBMS_OUTPUT.put_line ('I am in Procedure');
    DBMS_SCHEDULER.create_job (
    job_name => 'test_dbms_scheduler',
    job_action => '/home/bir4163/RPT33/bin/new.sh',
    number_of_arguments => 1,
    job_type => 'executable',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=SECONDLY; INTERVAL=1',
    enabled => FALSE,
    auto_drop => FALSE,
    comments => 'run shell script'
    DBMS_SCHEDULER.set_job_argument_value (job_name => 'test_dbms_scheduler',
    argument_position => 1,
    argument_value => v_text);
    DBMS_SCHEDULER.enable ('test_dbms_scheduler');
    DBMS_OUTPUT.put_line ('I am back in Procedure');
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line (SQLCODE || SQLERRM);
    END;
    But iam unable to test it as i do not have permissions to access dbms_scheduler.can anybody tell me how to solve this using DBMS_PIPE with a sample code.
    please do help its very urgent
    thanks
    ramya

    Hi,
    Register your Shell Script as a concurrent program, Executable execution method "Host", then use fnd_request.submit_request to submit the program.
    Regards,
    Andries

  • 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 Web service from Oracle Forms....

    Hi ,
    I 've tried to follow the steps described in the link:
    http://www.oracle.com/technology/obe/obe_as_10g/deploy/callws_fromforms/forms_webservice.htm
    which uses : a)JDeveloper 9.04 and b)Oracle Forms 9.0.4.
    However , i have installed Oracle Forms 10.1.2 and JDeveloper 10.1.2. (Developer Suite 10.1.2.).
    The problem is that in JDeveloper 10.1.2. the type of applications and menus and properties and.... have changed and i cannot finish the tutorial!!!!!
    Is there any document/example showing how to create a web service in JDeveloper and call it form Oracle Forms....?????
    NOTE: I have also installed JDeveloper 10.1.3...
    Many thanks ,
    Simon

    Check the JDeveloper tutorials page on OTN (linked from the JDeveloper home page) and you'll find a tutorial on creating a web service.
    The steps to invoke it from Forms should be the same.
    googling on Oracle Forms web services will bring a few more samples.

  • Calling a web service from Oracle 10g forms

    Hi Everybody
    I want to send SMS from my 10g forms.... I searched for the topic and I got the following link
    "http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html"
    Now I have downloaded "wsclient_extended_101320.zip"
    1. extracted the jar file,
    2. copied the jar file in "c:\ids10\WSclient"
    3. Specified jar file name in "default.env" "formsweb.cfg"
    4. Also specified the jar file name in "CLASSPATH" environment variable
    5. restarted OC4J instance
    6. Restarted Fotm Builder
    But I couldn't see the "webServiceProxy.proxy.SendServiceSoapClient" in Form Builder "JAVA CLASS iMPORTER"
    Can anyone plz help.....
    Wat may be the problem??
    Do I hav to follow the steps to create service as specified in demo page....or is it sufficient to download the jar file ??
    Or is there any other setting that I m missing???
    Thanx in advance....

    I created a new folder "WSclient" in "c:\ids10\forms"
    and added full path name in CLASSPATH......

  • RE: Calling a Web service from Oracle Forms 11g

    I wonder if anyone could please help with the following
    We have a requirement for a real time communication between Oracles Forms (11g) and SAP over the RR LAN network.
    This would require the need to send info to and receive info from SAP as it will be an on-line validation of a Part from an Oracle FORM to SAP (response less than 1 second).
    What would be the best and easiest way to code this an Oracle FORMS trigger.
    Thanks very much
    Durjoy
    tel 07790 495 626

    Hello,
    <p>Did you read this paper ?</p>
    Francois

  • 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);
    }

  • HELP!!! Problem of Calling external Web Service from a Java Stored Procedur

    1.I read the topic on http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html about Calling external Web Service from a Java Stored Procedur.
    2.After I import .jar to Oracle what is required by the topic,som error occued.
    Like: ORA-29521: javax/activation/ActivationDataFlavor class not found,
    ORA-29545: badly formed class.
    3.These is not enough .jar required on the topic? What can I do for ORA-29545: badly formed class?
    Thany you!

    Try this
    Re: HELP! Loading Java Classes into Oracle ERROR

  • Problems calling external Web Service from a Java Stored Procedure

    I'm using a sample code that I found here about calling external web services from a Java Store Procedure ( Credit Agency Web Service http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html ) but when I run it ,send this error. I dont know what can I do or what is missing. Please help me. Thanks.
    Error: Premature EOF encountered [java.io.EOFException] [SOAPException: faultCode=SOAP-ENV:IOException; msg=Premature EOF encountered; targetException=java.io.EOFException: Premature EOF encountered] at org.apache.soap.SOAPException.(SOAPException.java:77) at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:765) at org.apache.soap.rpc.Call.invoke(Call.java:261) at oracle.otnsamples.wsclient.CreditAgencyServiceStub.authorizeCustomer(CreditAgencyServiceStub.java:84) at Products.jspService(Products.jsp:120) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:795) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:794) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

    I'm also facing problem in running the example on the page http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html
    I've Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 and Oracle Application Server 10g (10.1.3). When I executed the following command,
    loadjava -thin -user sys/password@localhost:1521:oradb -resolve -synonym -verbose -grant public %OC4J_HOME%/webservices/lib/soap.jar %OC4J_HOME%/lib/dms.jar %OC4J_HOME%/jlib/javax-ssl-1_1.jar %ORACLE_HOME%/lib/servlet.jar %OC4J_HOME%/j2ee/home/lib/mail.jar
    ... mentioned in step 3 under the "Configuring the Application" section on the above link, the process terminates with the following error
    The following operations failed
    class oracle/net/www/protocol/https/Handler: resolution
    class oracle/net/www/protocol/https/HttpsURLConnection: resolution
    class oracle/soap/client/ProviderManagerClient: resolution
    class oracle/soap/client/ServiceManagerClient: resolution
    class oracle/soap/providers/JavaProvider: resolution
    class oracle/soap/providers/ejbprov/EntityEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatefulEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatelessEJBProvider: resolution
    class oracle/soap/providers/sp/SpProvider: resolution
    class oracle/soap/server/http/SOAPServlet: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection$1: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection: resolution
    class org/apache/soap/messaging/Message: resolution
    class org/apache/soap/rpc/Call: resolution
    class org/apache/soap/rpc/RPCMessage: resolution
    class org/apache/soap/rpc/Response: resolution
    class javax/net/DefaultServerSocketFactory: creation (createFailed)
    class javax/net/DefaultSocketFactory: creation (createFailed)
    class javax/net/ServerSocketFactory: creation (createFailed)
    class javax/net/SocketFactory: creation (createFailed)
    class javax/net/ssl/DefaultSSLServerSocketFactory: creation (createFailed)
    class javax/net/ssl/DefaultSSLSocketFactory: creation (createFailed)
    class javax/net/ssl/HandshakeCompletedEvent: creation (createFailed)
    class javax/net/ssl/HandshakeCompletedListener: creation (createFailed)
    class javax/net/ssl/SSLException: creation (createFailed)
    class javax/net/ssl/SSLHandshakeException: creation (createFailed)
    class javax/net/ssl/SSLKeyException: creation (createFailed)
    class javax/net/ssl/SSLPeerUnverifiedException: creation (createFailed)
    class javax/net/ssl/SSLProtocolException: creation (createFailed)
    class javax/net/ssl/SSLServerSocket: creation (createFailed)
    class javax/net/ssl/SSLServerSocketFactory: creation (createFailed)
    class javax/net/ssl/SSLSession: creation (createFailed)
    class javax/net/ssl/SSLSessionBindingEvent: creation (createFailed)
    class javax/net/ssl/SSLSessionBindingListener: creation (createFailed)
    class javax/net/ssl/SSLSessionContext: creation (createFailed)
    class javax/net/ssl/SSLSocket: creation (createFailed)
    class javax/net/ssl/SSLSocketFactory: creation (createFailed)
    class javax/security/cert/Certificate: creation (createFailed)
    class javax/security/cert/CertificateEncodingException: creation (createFailed)
    class javax/security/cert/CertificateException: creation (createFailed)
    class javax/security/cert/CertificateExpiredException: creation (createFailed)
    class javax/security/cert/CertificateNotYetValidException: creation (createFailed)
    class javax/security/cert/CertificateParsingException: creation (createFailed)
    class javax/security/cert/X509Certificate: creation (createFailed)
    exiting : Failures occurred during processing
    I've checked the path to all the jar files.
    I tried to run the command again with system/password instead sys/password but then I got the following stacktrace:
    The following operations failed
    class oracle/net/www/protocol/https/Handler: resolution
    class oracle/net/www/protocol/https/HttpsURLConnection: resolution
    class oracle/soap/client/ProviderManagerClient: resolution
    class oracle/soap/client/ServiceManagerClient: resolution
    class oracle/soap/providers/JavaProvider: resolution
    class oracle/soap/providers/ejbprov/EntityEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatefulEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatelessEJBProvider: resolution
    class oracle/soap/providers/sp/SpProvider: resolution
    class oracle/soap/server/http/SOAPServlet: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection$1: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection: resolution
    class org/apache/soap/messaging/Message: resolution
    class org/apache/soap/rpc/Call: resolution
    class org/apache/soap/rpc/RPCMessage: resolution
    class org/apache/soap/rpc/Response: resolution
    exiting : Failures occurred during processing
    Thanks in advance for any useful help.
    -

  • How can we call a WEB SERVICE from an Oracle DB?

    <h2>
    What the methods available to call a WEB SERVICE from the DB. I.e. through a DB Stored Procedure?
    I was given this article by a colleague, but since it’s a 2005 one, I feel it could be outdated?
    http://www.oracle.com/technology/pub/articles/mensah_dws.html
    Also, is it possible to write ONE “Common” DB stored procedure to call ANY WEB SERVICE?
    </h2>

    <h2> No Girish, what I meant is, since it is 2005 article, the method it describes to call a WS is out of date.
    Because I am quite sure in 2009, 4 years later Oracle must have added built-in packages and other methods to simplify it???
    Also, I would be very grateful if you advice on the other issue: Is there a way to create a single DB stored procedure to call ANY WS?? i.e. a common routine to call any web service?
    </h2>

Maybe you are looking for

  • Need advice about design approach for query editing tool with JSF

    Hi ! I would like to propose in my application a way to allow end-user to create queries that could be executed on a some tables. I suppose that this kind of stuff is not new and would like to know if someone has to good design practice or example to

  • Linking an object to copies of itself

    Can an object be linked to copies of itself, such that changing the attributes of one object will change the attributes of all its copies at the same time? For example, if you have the same button on many slides in a project, it would be very desirab

  • IF YOU CAN DO NO GOOD, AT LEAST DO NO HARM

    I just ran the update you sent me (to acrobat, i think) and beside installing google chrome and other stuff i don't want, now utube full screen doesn't work.  How do i get utube back and get rid of everything that has anything to do with adobe???

  • Import/Merge/Recreate Photo library?

    My G5 died. It had iPhoto '08, quite a few albums, and about 10 gallery albums. I also have a MacBook (which currently only has iPhoto '06, but I'll install iPhoto '08 - as long as it's intel compatible, which I'm guessing it is.) The MacBook has a s

  • How to create dynamic action

    hi friends, could u plz tell me how to create dynamic action?  with regards, Priya.S