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

Similar Messages

  • Calling Report From Oracle Forms

    Hi
    I am calling this one report from oracle forms, I am using global temporary table to run that report. I am first inserting data into the temporary table through oracle form and then i am calling report in that form to view the data in that temporary table. The problem is, we can not view the data of an other session if we are using temporary table. When i call report from that form a new session get created due to which i can not see the data. Is there any method of calling report from oracle form that a same session is used to run the report?
    Thanks.

    As you mention Forms and Reports do not share the database session. I had the same problem and resolved it using record groups and DATA_PARAMETER to transfer data from Forms to Reports. You could also read the Note 110495.1 on Metalink to find useful information regarding this issue.
    Adi

  • 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

  • Calling reports from oracle forms 9i

    Hi
    I succeded to call reports from oracle forms but for I have a problem for only one report so I can't call it. this a part of the code I'm using :
    declare
         pl_id2 ParamList;
         pl_name2 VARCHAR2(30) := 'liste2';      
    v_rep VARCHAR2(100);
         rep_status VARCHAR2(20);
    begin
    pl_id2 := get_parameter_list(pl_name2);
    if (Id_Null(pl_id2) )THEN     
    pl_id2 := Create_Parameter_List(pl_name2);
    IF NOT Id_Null(pl_id2) THEN     
         add_parameter(pl_id2,'mois',TEXT_PARAMETER,:mois);
    END IF;
    end if;
    IF NOT Id_Null(pl_id2) THEN
    if(:mois is not null) then
    v_rep := RUN_REPORT_OBJECT('My_report',pl_id2);
    message(v_rep);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank');
    ELSE      
    message('Error when running report');
    END IF;
    end;
    the problem I've remarqued is that the function message(v_rep) is always returning the value :'repserver_0'.
    so when I execute the previous code I'm getting the 2 messages : 'repserver_0' and 'Error when running report'.
    Rq: the report my_report is running very well in report builder.
    does someone see where is the problem so can help me??
    thanx.

    Hi,
    This usually happens when the report fails on the report server. To obtain details on why a particular report has failed, use the showjobs page :
    http://server.domain:PORT/reports/rwservlet/showjobs?server=repserver
    and check the detailed error occured.
    This is logged as Bug:3017948. It is marked to be fixed in version 9.0.4 (Reports 10g) and also has one-off patches for version 9.0.2.3 on Windows platforms. If you need further assistance about patches, please raise a Service Request (SR) with Support via Metalink (http://metalink.oracle.com).
    Regards,
    -Bulent

  • Calling Report from Oracle form 11g

    I am new to Forms 11g, trying to call report from Oracle forms 11g .
    I want to call report from oracle forms, but its giving error.
    Below is the code
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    BEGIN
    repid := FIND_REPORT_OBJECT('empreport'); -- report node in forms builder
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, BATCH);
    set_report_object_property ( repid, report_filename, 'empreport.rdf' ); -- report name
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'RptSvr'); -- report server name
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    if
    rep_status = 'FINISHED'
    then
    WEB.SHOW_DOCUMENT('http://inorasrv-pc:7001/reports/dtd/rwservlet/getjobid='||v_rep||'?server='||'RptSvr','_blank');
    else
    message ( 'error while running reports-object ' || error_text );
    message ( ' ' );
    clear_message;
    end if;
    end;
    Above code giving following error :
    Unable to connect to report server RptSvr
    I think my report servername is wrong
    Where to find report server name in 11g.
    I am Using weblogic server, so can i give weblogic server name
    Thanks in advance.
    Edited by: parapr on Aug 17, 2012 1:52 AM
    Edited by: parapr on Aug 17, 2012 3:21 AM

    Hi,
    You have to have the report server
    a. Installed and configured
    b. Running.
    See
    http://docs.oracle.com/cd/E21764_01/bi.1111/b32121/pbr_strt001.htm
    http://docs.oracle.com/cd/E17904_01/bi.1111/b32121/pbr_verify004.htm
    http://docs.oracle.com/cd/E17904_01/bi.1111/b32121/pbr_conf003.htm#i1007341
    If you are using rwservlet then you will find the name from the Configuration file referred to in the last link.
    Cheers,

  • Call APEX from Oracle*Forms

    My first APEX
    I have "built" a APEX-Application to upload and download documents (APEX advanced tutorial).
    It works as a stand-alone-solution.
    Now I want to call this APEX-Form from Oracle*Forms (web.show_document(url))
    I found that I can call a specific Apex-Page by application-id and page-Number.
    But APEX still asks for Username/ Password. And I want to transfer some other parameters to apex.
    The url I could hide. I also think about encryption/ time-stamp mechanism.
    I think there should be a standard-mechanism.
    But now I am in doubt: Is this possible at all?

    hi Scott.
    i actually developed a javabean to communicate with a mikrotik router and it works very nice on Oracle forms 10g !
    but i need to develop an mobile interface for users , so i am using apex to accomplish this task, but i will need to call the javabean from apex.
    thanks

  • Error when calling webservice from oracle function.

    Hi,
    I am getting following error when i am trying to call webserivce from oracle function. Please can anyone suggest the required solution. Below is the error obtained.
    Thanks.
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00225: end-element tag "UL" does not match start-element tag "P"
    Error at line 15
    ORA-06512: at "SYS.XMLTYPE", line 54
    ORA-06512: at "SCOTT.DEMO_SOAP", line 87
    ORA-06512: at "SCOTT.WEB_SERVICE", line 17

    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

  • How to configure and call Jasperreport from Oracle Forms 10gr2

    Dear All
    Please help me in configuring Jasperreport with Oracle Forms 10gr2 or AS.
    And also tell me how to call a report from Oracle Forms.
    Thanks

    I have a pro*c precompiled program on unix server (unix environment) and I want to execute or running it from oracle forms, release 4.5 on MS Windows.
    how do i execute or running it from oracle forms, release 4.5 ? please tell me what the command (syntaxs) is and all about it ?you can mail me at [email protected]
    thank's

  • Calling BIP from Oracle Forms: Having Java version problem.

    <h3>
    Hi,
    I tried to call a BIP report through Oracle Forms.
    I followed this PDF.
    http://www.oracle.com/technology/products/xml-publisher/docs/Forms_BIP_v22.pdf
    Problem is, when I run the form, I get this error (copied from the Java Console)
    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\channasiriwardena
    Proxy Configuration: Manual Configuration
    Proxy: 192.168.11.100:81
    Proxy Overrides: *.iil.informatics.lk,192.168.11.*,192.168.10.*,<local>
    JAR cache enabled
    Location: C:\Documents and Settings\channasiriwardena\Oracle Jar Cache
    Maximum size: 50 MB
    Compression level: 0 Forms Applet version is : 10.1.2.0
    java.lang.UnsupportedClassVersionError: oracle/j2ee/ws/client/ServiceFactoryImpl (Unsupported major.minor version 49.0)
    I am using Forms Forms [32 Bit] Version 10.1.2.0.2.
    JDeveloper Version is 10.1.3.5.0.
    The Forms 10g Java version is 1.4.
    So according to what I discovered on the net, the problem is: My JInitiator is 1.3 using JRE 1.3, BUT my .JAR file is Java 1.5.
    Since we are using the Oracle JVM, ticking “Use JRE 1.5..” in the Advanced tab of the Internet Explorer Options has no effect.
    We cannot upgrade the Oracle JInitiator to a 1.5 since there is no such JInitiator version. JInitiator is available only up to 1.3.1.30.
    What can I do. What if I install Java 1.3 in my machine and re-compile my JAR file with that? Will that work or is there another solution?
    Has anybody encountered this problem?
    Any help would be greatly appreciated.
    Thanks & Regards,
    C.S.
    </h3>

    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

  • Calling webservices in Oracle Forms version 6.0.8.26.0

    Hi,
    I am trying to call a webservice from Forms version 6.0.8.26.0. I have created the jar file using JDeveloper 9.0.3.1. I could import the class in forms but when I compile the form, it gives me the following error:
    Error 306 at line 13 column 13
    wrong number or types of arguments in call to NEW_OBJECT
    Error 0 at line 13 column 5
    Statment ignored
    Error 306 at line 19 column 13
    wrong number or types of arguments in call to GET_STRING_FIELD
    Error 0 at line 13 column 5
    Statment ignored
    and so on....
    Please advise what I need to do? This version of forms does not have any default.env. So I'm not sure if there is any other path where I need to put in the jar file path. Please advise soon.
    Thanks to all in advance.

    Please can somebody reply....

  • 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 Webservice from Adobe form - Webservice URL  Issue

    Dear Friends,
      I have developed a webservice and calling it from an Adobe form. I have downloaded the WSDL file from tcode SOAMANAGER. When I create a data connection from the Adobe form  I use this WSDL file and the form elements gets created automatically and I drag and drop them into the form. The issue is when I click on the Submit(Execute) button the Webservice URL is always pointed to the client from where the file was downloaded and its hard-coded ( for example if i download the wsdl file from client 300 then the URL would be http://<location>/sap/bc/srt/rfc/sap/z_web_getmat/300/z_web_getmat/z_web_getmat). So if i execute the form from client 200 its not working. How to make this URL dynamic so that the webservice gets executed from the client from where this form is called. Please advice.
    Regards
    Sapient

    Hi,
    You have to handle it in your form on submit button calling the web service:
    Write below java script code at submit event to change the URL at run time:
    var tempsoapAddress = xfa.connectionSet.DataConnection.getElement("soapAddress").value;
    var tempwsdladdress = xfa.connectionSet.DataConnection.getElement("wsdlAddress").value;
    var ServerPath = body.systemConfig.system.rawValue;
    var client = <Get Client from a data attribute>
    var Soap_PreServerPort =  "http://";
    var Soap_PostServerPort =  "/sap/bc/soap/rfc?sap-client=";
    var SoapAddress = Soap_PreServerPort + ServerPath + Soap_PostServerPort + client ;
    var Wsdl_PreServerPort =  "http://";
    var Wsdl_PostServerPort1 =  "/sap/bc/soap/wsdl11?services=ZBAPI_PO_CREATE2&amp;sap-client=";
    var wsdlAddress =  Wsdl_PreServerPort + ServerPath + Wsdl_PostServerPort1 + client ;
    xfa.connectionSet.DataConnection.getElement("soapAddress").value = SoapAddress;
    xfa.connectionSet.DataConnection.getElement("wsdlAddress").value = wsdlAddress;
    xfa.connectionSet.DataConnection.execute(0);
    xfa.connectionSet.DataConnection.getElement("soapAddress").value = tempsoapAddress;
    xfa.connectionSet.DataConnection.getElement("wsdlAddress").value = tempwsdladdress;
    xfa.connectionSet.DataConnection = null;
    Change the variable wsdlAddress as per your requirement. The above code is just a sample.
    For getting the client pass it in a datasource variable attribute at time of downloading the form. At time of submit get the value of that variable and use it to form the url.
    Regards,
    Vaibhav

  • Invalid ID calling report from oracle forms 10 G

    Hi, I have a problem during calling a report object 10g from a FORM, the source code is below the message, an the error message is can't not find PLAN_FUZZY (my report module name)...... WHY ???
    DECLARE
         repid REPORT_OBJECT;
         v_rep VARCHAR2(100);
         Rep_status VARCHAR2(20);
    BEGIN
         repid := FIND_REPORT_OBJECT('PLAN_FUZZY');
         V_rep := RUN_REPORT_OBJECT(repid);
    END;

    hey,
    May i know have u attached the report to your form???
    i think the best way is using RUN_OBJECT method
    Run_Product(REPORTS, 'report_path', SYNCHRONOUS, RUNTIME,
    FILESYSTEM, NULL, NULL);
    if your report is at reportxx folder then you can just write report file name.
    Hope it will help you.

  • Problem calling WebService from VisualComposer model at runtime

    Hello Experts,
    I have a very simple model with form as input for calling Webservice on backend system and a table as output.
    During the runtime the WebService call is failing with:
    Error while getting the backend function : Could not find operation Z_EAI_GETUSERROLES_WS.ZEaiGetuserroles
    The service definition is succesfully published to CE's ServiceRepository.
    There is a correct entry for backend system under SOA->Destination Template Management in CE NWA.
    I can succesfully test this WebService in WSNavigator in both systems - CE and backend.
    I can succesfully test this WebService in NWDS at design time (by right-clicking on service)
    In Logs Viewer I can see the following entries:
    error 2011-10-13 17:16:01:838 Stopped further execution since the interpreter is unusable /Applications/wd4vc com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.XGLInterpreter sap.com/aanisecurityui~vc_impl
    info 2011-10-13 17:16:01:837 Closing the connection for the system SRR /Applications/wd4vc com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.postExecution:  sap.com/aanisecurityui~vc_impl
    warning 2011-10-13 17:16:01:272 No classification system found for ID 'uddi:uddi.sap.com:categorization:physical-system-id' /Applications/UDDI/Classification com.sap.esi.uddi.sr.cs.handler.impl.ejb.util sap.com/tcesiuddisrcs~ear
    Can you please advise me what else I need to check to solve this error?
    Best Regards,
    Artsiom Anichenka

    Hi Artsiom ,
    I don't know VC and how it is on CE 7.3, but when developing Java Webdynpro application using CE 7.11 on same principle (with destination template defined in NWA), we sometimes faced almost same situation due to cache problem...
    Basically, this happen if you deploy your application using a model, change your webservice (for example adding a new field), re-import the model in NWDS and re-deploy. In NWDS, everything seems to be ok, but at runtime, it fails due to cache problem which is not refreshed with the new meta data definition. The only solution in 7.11 was to restart the server. I think (but not sure) that starting 7.2, there is a tool to clean the (webservice) cache.
    I hope it could help...
    Regards
    Olivier

  • Problem calling WebService from XI scenario

    Hi forum,
    i trued to make a scenario to call a webservice from my XI scenario, i made it using the following blog :
    /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
    I have configured a receiver SOAP channel and has mentioned the Target URL as
    http://www.webservicex.net/CurrencyConvertor.asmx
    now the scenario gives the error in the communication channel monitoring in RWB as
    SOAP: call failed: java.net.UnknownHostException: www.webservicex.net
    but from my local machine i can access this URL, ....can u pls site the defect

    Hi sudeep,
         Specify the proxy address details like address and port. and also check the soap receiver channel properly configured or not.
    Regards,
    Deviprasad Pothireddi.

Maybe you are looking for