Calling Web Service passing xml from Oracle Forms

Hello,
I need to call a .net web service from Oracle Forms that passes in xml data and returns xml data.
I have seen several examples of how to create a wrapper in jdev and then to import the code
into forms. I just have not seen any examples that are passing parmameters especially not xml
as a parameter and that have an active wsdl that I can see how it relates to the code created.
I have a wrapper but cannot figure out where and what notation to use to include passing in
an xml object.
Does anyone have an example passing in xml where the wsdl is still available to see?'
Forms version 10.1.2.0.2. Jdev 10.1.3.4
Thanks,
Linda
Edited by: lboyce on Jan 5, 2009 2:30 PM

Also here you have several options...
1. you can make a PJC (bean) which include a webservice stub generated with axis (you can make a stub and also test a webservice with this tool: www.soapui.org)..
2. you can make a database webservice with JPublisher and then just call a pl/sql wrapper for this webservice
4. you can call a webservice with java api (HttpsURLConnection, HttpURLConnection or with apache HTTPClient api) from your PJC for example:
the code below is used as java stored procedure to call a .net webservice on https
====================================
public static int getPStopnja(String polica, String reg_oznaka,
String ime_osiguranika,
String naziv_osiguranika,
String leasing,
String[] doc) {
String l_polica="";
String l_reg_oznaka="";
String l_ime_osiguranika="";
String l_naziv_osiguranika="";
String l_leasing ="";
URL url = null;
HttpsURLConnection conn = null;
BufferedReader br = null;
String lineIn = null;
StringBuffer sb = new StringBuffer();
OutputStream os = null;
int rc = 0;
//kontrole
l_polica = polica==null ? "":polica;
l_reg_oznaka = reg_oznaka==null ? "": reg_oznaka;
l_ime_osiguranika = ime_osiguranika==null ? "": ime_osiguranika;
l_naziv_osiguranika = naziv_osiguranika==null ? "": naziv_osiguranika;
l_leasing = leasing==null ? "": leasing;
String body = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
body += "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"https://services.huo.hr/web_ao/\">";
body += "<soapenv:Header/>";
body += "<soapenv:Body>";
body += "<web:get_pstupanj>";
body += "<web:param_in>";
body += "<web:polica>"+l_polica+"</web:polica>";
body += "<web:reg_oznaka>"+l_reg_oznaka+"</web:reg_oznaka>";
body += "<web:ime_osiguranika>"+l_ime_osiguranika+"</web:ime_osiguranika>";
body += "<web:naziv_osiguranika>"+l_naziv_osiguranika+"</web:naziv_osiguranika>";
body += "<web:leasing>"+l_leasing+"</web:leasing>";
body += "</web:param_in>";
body += "</web:get_pstupanj>";
body += "</soapenv:Body>";
body += "</soapenv:Envelope>";
SSLContext sslContext = null;
try {
sslContext = SSLContext.getInstance("TLS");
X509TrustManager[] xtmArray = new X509TrustManager[|http://forums.oracle.com/forums/] { xtm };
sslContext.init(null, xtmArray, new java.security.SecureRandom());
} catch (GeneralSecurityException gse) {
doc[0] = gse.toString();
return -1;
if (sslContext != null) {
conn.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
try {
conn.setDefaultHostnameVerifier(hnv);
} catch (Exception ex) {
doc[0] = ex.toString();
return -1;
try {
URL st = new URL("https://services.huo.hr/web_ao/web_ao.asmx");
conn = (HttpsURLConnection)st.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Host", "services.huo.hr");
conn.setRequestProperty("Content-Length", "" + body.length());
conn.setRequestProperty("SOAPAction",
"\"https://services.huo.hr/web_ao/get_pstupanj\"");
conn.setRequestProperty("Content-Type", "text/xml;charset=UTF-8");
conn.setDoOutput(true);
OutputStreamWriter wr =
new OutputStreamWriter(conn.getOutputStream());
wr.write(body);
wr.flush();
BufferedReader in =
new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
sb.append(new String(inputLine.getBytes(),"UTF-8"));
in.close();
//System.out.println(new String(sb.toString().getBytes(),"ISO8559_2"));
doc[0] = sb.toString();
return 0;
} catch (Exception e) {
doc[0] = e.toString() + " ===> " + body + " ==>length= " + body.length();
return -1;
====================================
best regards
Edited by: Peterv6i on Jan 6, 2009 8:34 AM
Edited by: Peterv6i on Jan 6, 2009 8:40 AM

Similar Messages

  • ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http

    I am getting error message ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http PL/SQL package,
    when browsed through some of the messages they point to setting Oracle Wallet Manager.
    I am trying to connect
    Any idea on how to resolve this issue ?
    your input is appreciated.
    Thanks
    Ravi

    Duplicate post ... please ignore.

  • Error 504 DNS look up failed while calling web services using XML

    Hi, I am trying to call web service from Oracle using XML.
    Everything seems to be in place but im getting an error "The webserver for <My End URL> reported that an error occurred while trying to access the website. Please click here to return to the previous page."
    If I directly access the end url from my browser its accessible and seems to work fine.
    The http response receiveed is mentioned below:
    Status code: 403
    Reason phrase: Forbidden
    <html>
    <head>
    <title>504 DNS look up failed</title>
    </head>
    <body>
    <font size=2><table width="100%"><tr><td bgcolor=#3300cc align="center" colspan=2>504 DNS look up failed</td></tr></table><br><br>The webserver for 'My End URL' reported that an error occurred while trying to access the website. Please click <u>here</u> to return to the previous page.<br><br><hr></font></body>
    </html>
    Im using Oracle 9i
    Please help
    Edited by: 927814 on Apr 15, 2012 11:41 PM
    Edited by: 927814 on Apr 15, 2012 11:46 PM

    Without far greater details as to what you are doing, what you have installed, and what you have tried, not much can be offered. All that I can gather from the information you provided is that the server name you are trying to contact either is not responding or is invalid. If you have Forms installed on your local machine (for example using Developer Suite), try using localhost rather than the hostname. For example, http://localhost:port/forms/frmservlet?form=yourform
    http://www.checkupdown.com/status/E504.html

  • Calling BO XI Release 2 from Oracle Forms 10g

    Post Author: alexre
    CA Forum: Integrated Solutions
    Hello everybody,
    We are going to migrate the Oracle Database and the Oracle forms application to 10g to one of our clients but he wants continue using the BO so he is going to migrate BO v 4.1.6 to XI Release 2.
    Because I am not a BO specialist I would like to know
    Is it possible to publish the BO report on the WEB?
    Can I call the report directly from Oracle Forms 10g (WEB) and pass the parameters?
    Can you advice any documents related to this topic?
    Thank you in advance for your help.
    Alex

    Post Author: jsanzone
    CA Forum: Integrated Solutions
    Alex,
    Your first question leads to a "it depends" answer.  If you want to publish static content, then the report can be ran and saved as PDF, then that PDF can be made available as a link in another web server. If you want to publish dynamic content, then "no", but read on because you'll see in answer to #2 and #3 it becomes "yes".
    Your second question about calling the report directly from Oracle Forms and pass the parameters is a resounding yes!  However, you will need to have an enduring knowledge of a concept called "opendocument" within the Business Intelligence tool as well as an authentication strategy to make it all work.
    Here is the answer to your third question, please following this link:  http://support.businessobjects.com/communityCS/TechnicalPapers/be_xi_r2_opendocument.pdf.asp
    Good luck!

  • Modifying properties with a file for Web Service Stub used for Oracle Forms

    I have created a stubbed-out web service in JDeveloper (10.1.3.4) and imported into Oracle Forms.
    However, I would like to use a properties file to call the appropriate endpoint based on if the environment is dev, test, UAT or prod. I see that a properties file is referenced in the _Stub class. Here is a snippet of code from that class file:
    public CriticalChangeWS_Soap11_Stub(HandlerChain handlerChain) {
    super(handlerChain);
    setProperty(ENDPOINTADDRESS_PROPERTY, "http://epw-01.gds.graebel.com:8087/CriticalChange.svc/Soap11");
    setSoapVersion(SOAPVersion.SOAP_11);
    setServiceName( new QName("http://tempuri.org/","CriticalChangeService"));
    setPortName( new QName("http://tempuri.org/","CriticalChangeWS_Soap11"));
    setupConfig("wsquery/proxy/runtime/CriticalChangeWS_Soap11_Stub.xml");
    How can I use the XML file to set the ENDPOINT_ADDRESS_PROPERTY?
    Thanks.
    Jim O

    Hi Frank,
    I got the following two lines of code just to check if WebServiceConnection was able to read the connections file alright.
                String urlString = wsc.getWsdlUrlStr();
                System.out.println("WSDL URL: "+urlString);
    I am not using urlString for further processing.
    The output is
    WSDL URL: http://<host>/PSIGW/PeopleSoftServiceListeningConnector/MyService.1.wsdl
    java.lang.NullPointerException
            at java.lang.Class.isAssignableFrom(Native Method)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:97)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:118)
    The WSDL Url pointed to is the one that I configure in the connection while deploying the App.
    Ran a test and WSDL Url is accessible by the app.

  • Calling third party java page from Oracle form

    Hi,
    Is it possible to call a third party java (html+java) form page (residing in separate web service server) which would take input from standard Oracle form (OCO) page?
    The third party page would validate the fields sent by form page and then will provide the results which should be copied back into standard oracle OCO form page.
    Regards,
    Aneesh

    Don't know if you can do this from Forms PL/SQL, but you should be able to write a stored procedure in the database that does it for you. The stored procedure could use the database package UTL_HTTP to make the HTTP request and receive the response.
    Your custom stored procedure can be called from Forms PL/SQL. If you are caling to a tru web service, you can also look at the UTL_DBWS package which is a bit more high level for calling a web service, than the raw UTL_HTTP package.

  • Web service proxy client from Oracle DB

    I need to call an external webservice from oracle db... but this web service does not support "SOAP with attachments" and its specification says that we have to develop a J2EE proxy client to access this web service, this still could be done in a stored procedure, loading jdeveloper generated code in java?, I know that with Jdeveloper I can generate a 'web service stub/skeleton' but how make this stub accesible from oracle with PL/SQL? is this possible?
    thanks in advance

    I need to call an external webservice from oracle db... but this web service does not support "SOAP with attachments" and its specification says that we have to develop a J2EE proxy client to access this web service, this still could be done in a stored procedure, loading jdeveloper generated code in java?, I know that with Jdeveloper I can generate a 'web service stub/skeleton' but how make this stub accesible from oracle with PL/SQL? is this possible?
    thanks in advance

  • Calling a pl/sql function from oracle forms

    I have written a pl/sql function in a package.
    package name- sup
    function name - func
    I have written a when-button-pressed trigger .from here I want to call this function.
    How can I do that?
    Please help..

    Thanks a lot..
    User may select 20-30 check boxes for respective name & id...then at the end , user will hit OK...from here when-button-click will call a procedure....that will update/insert/delete a table data.The procedure I have written is:-
    DECLARE
    N_CNT Number(1);
    D_SYSDATE Constant date :=sysdate;
    Begin
    select count(1)
    into N_CNT
    from dbtable L
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    if ((N_CNT = 0) and (:LANDLISTE.state = 'A')) then
    insert into dbtable
    LAND_ID,
    STATE,
    suppl_prof_id,
    suppl_id,
    OPERATOER_ID,
    SIDST_OPD_DATO,
    SIDST_OPD_INIT
    values
    :BLK1.LAND_ID,
    'Y',
    :BLK1.suppl_prof_id,
    :BLK1.suppl_id,
    :BLK1.Operatoer_id,
    D_SYSDATE,
    :BLK1.SIDST_OPD_INIT
    elseif
    ((N_CNT>0 )and (:LANDLISTE.state = 'A')) then
    update dbtable L
    set L.SIDST_OPD_DATO = D_SYSDATE,
    L.SIDST_OPD_INIT = :BLK1.SIDST_OPD_INIT
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    elseif ((N_CNT>0 ) and (:LANDLISTE.state = 'D')) then
    delete from dbtable L
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    end if;
    end;
    Will it be able to load multiple data(20-30 at a time) to the table?
    Should I write anything to commit the data in the table?
    I am very new to oracle forms...please help..

  • Passing parameters from oracle form to html

    Hello,
    I have an application that requires me to take data from an oracle web form and pass many fields as parameters into an html table.
    Is this possible?

    Hi Rose,
    There is a specific sample form for this kind of actions in the Oracle9i Forms Demos. It is called Save2HTML.
    from the help file: F90Write.Write_HTML Description
    Writes the data from the specified block to a file in HTML format.
    Maybe you can alter the code for your own use.
    succes,
    Mark

  • Passing parameters from oracle form to the outside Environment ??

    i hava an application in
    c:\program files\sms app\sms.exe
    this application can run in command prompt and accepts parameters to send sms to customers
    example of command to send sms from command prompt(cmd) ,
    - i navigate to application path c:\program files\sms app\sms.exe and run command below
    sms.exe /p:+1012121212 /m:"message body goes here" /l /t
    my question is how can i implement a form contains two text box items & one button
    in button press trigger i want code that can pass the textbox1.text to the
    command line application sms.exe /p:textbox1.text in the parameter position which accepts the phone_number like above example
    and pass the textbox2.text to the other parameter in application which accepts message_body with "" _Double caution marks around the message body
    so the final command line will look like this :
    Application_Path\sms.exe /p:+1012121212 /m:"message body goes here" /l /t
    Notes:
    textbox1.text = parameter_data_type = number
    textbox2.text = parameter_data_type = varchar2
    Oracle Developer Suite 10g , OS:Windows 7
    Thanks you very much

    thanks for replay poelger ,
    can y tell me the full command which i'll use ????
    the problem is to escape the "",/ characters ,, so the final result will look like this
    Application_Path\sms.exe /p:+1012121212 /m:"message body goes here" /l /t
    the host needs to check for the operating system??
    Again Thanks..

  • Calling report in JSP format from oracle forms...

    I created a report and save it in 2 formats (.rdf and .jsp)...
    Now instead of using the rdf format(which opens in a pdf inside a web browser) ...i want to call the report in jsp format

    Suhail,
    You can even call a .rdf report in HTML format. You have to set the Report Destination Format to html.
    For calling the jsp report , you don't have to do that differently either. Place your jsp report in the REPORTS_PATH directory.
    Then set your report object to that of html destination.

  • 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

  • Passing parameters to oracle rports from oracle forms

    Dear all,
    Can anyone tell me how to pass parameters from oracle forms 10g to oracle reports 10g ,i want to hide my connection string and parameteres while open the report through web
    can anyone plese help me out to solve this problem.

    Hi,
    I had trail as advised, but anticipated results were not observed.
    Here is the named configuration in formsweb.cfg
    [NMPT]
    form=D:\NMPT\FORMS\FHOPENFORM.fmx
    userid=hmsprod/hmsprod@hindalco
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    imageBase=CodeBase
    separateFrame=True
    lookandfeel=oracle
    logo=none
    splashScreen=no
    pageTitle =Test Application
    background=no
    colorScheme=blue
    archive_jini=f90all_jinit.jar,icons.jar,frmwebutil.jar,jacob.jar
    archive=f90all.jar
    height=768
    width=1024
    envFile=nmpt.env
    otherparams=useSDI=yesLOCATIONID=NMPT # new parameter which I want to access in my form
    the URL is as follows:
    http://MyPC:8888/forms90/f90servlet?config=NMPT
    But I am unable to open the login page

  • Call an executable file from oracle forms 6i

    Hello ,
    i want to call a local .exe file from oracle forms 6i passing along a couple of parameters in the command line .
    Can anyone help me out here ?
    thanks
    C.
    Edited by: user539712 on Jan 21, 2011 11:55 AM
    Edited by: user539712 on Jan 21, 2011 11:55 AM

    that worked...now i am facing a different issue now which i didnt have without the start command . i am calling iexplorer.exe but i am passing a long a url in the command line . the 2nd parameter in the url is not working so when i do :
    "start c:\progra~1\intern~1\iexplore.exe" http://localhost/hello.jsp&a=ddd&b=333
    the &b=333 is not passed (some issue with the & character i am guessing). Would you know a workaround ?
    thanks

  • Launching web aplication from oracle Forms

    1) How to launch any other web application from from oracle Forms application.
    2) Can we pass parameters from Oracle forms application to other web application? if yes how?
    Help me

    2) You can use global variables or you can use the call_form built-in and share_library_data = yes. Recommended by Oracle.

Maybe you are looking for

  • RGB to CMYK Conversion

    Does the newer version of Photoshop Elements 13 offer the capability of converting/saving files in CMYK mode like the full commercial of Photoshop does? My older version of Photoshop Elements does not.

  • Oracle to mysql

    dear all,              i was connecting MYSQL database from oracle database.i got the following error ,shown below- ]$ ./isql myodbc5 -v [01000][unixODBC][Driver Manager]Can't open lib '/opt/oradb/patches/myodbc-5.3.4/lib/libmyodbc5.so' : file not fo

  • WAAS inline deployment

    Hello All, I'm deploying a couple of WAE-512's in "inline" mode for a customer. I have the configuration and seems pretty straight forward, looks like I just need to have the inlinegroup created and allow all VLAN's. I will also have a crossover conn

  • I mac -- how do I transfer template date and logo to the other 9 template cards. I am new to this and need step by step.  I have the first template completed. Thanks

    I mac -- how do I transfer template date and logo to the other 9 template cards. I am new to this and need step by step.  I have the first template completed. Thanks

  • With out portal server can we enable mobile mail?

    for example i using only messaging server,is it possible to enable mobile mail? if iam using portal ,i can use MAP to enable mobile mail,but with out using portal how can i enable mobile mail? plz give me the sugg. thanx