Stopping initial webservice call on load: search form

I found this issue in the archived forums: Stopping auto execute in search
It is an old post but apparently still an issue, because I am running into it right now. I am now trying to workaround it with a backing bean but that's not quite how it should be (and it doesn't even work).
I also can't find the bug number mentioned in the thread (bug # 6469864) .
What I have is a methoditerator corresponding with a call to a webservice, and 2 accessorIterators because I want to show detail-information. So the pageDefinition looks like this:
<methodIterator Binds="findObjecten.result" DataControl="WozGegevens" RangeSize="500"
                    BeanClass="dbga.taxatieverslagbalie.view.WozGegevens.findObjecten" id="findObjectenIterator"
                    Refresh="ifNeeded" RefreshCondition="#{DataBean.refresh} "/>
<accessorIterator MasterBinding="findObjectenIterator" Binds="WozObjecten" RangeSize="500" DataControl="WozGegevens"
                      BeanClass="dbga.taxatieverslagbalie.view.WozGegevens.findObjecten.WozObjecten"
                      id="WozObjectenIterator" Refresh="ifNeeded" RefreshCondition="#{DataBean.refresh}"
                      />
<accessorIterator MasterBinding="WozObjectenIterator" Binds="WozObject" RangeSize="500" DataControl="WozGegevens"
                      BeanClass="dbga.taxatieverslagbalie.view.WozGegevens.findObjecten.WozObjecten.WozObject"
                      id="WozObjectIterator" Refresh="ifNeeded" RefreshCondition="#{DataBean.refresh}"
                      />I set the af:table settings to contentDelivery="immediate" and autoHeightRows="500", simply because I don't want to scroll through the table, but instead scroll on the page.
The method in the backing bean checks a boolean which is set to false by default (to prevent initial search, this part is the only part that is working) and the value of the inputText, but even when the refresh method returns false the search is still done with an empty parameter when I press the search button, and I cannot seem to stop it.
This is JDeveloper 11.1.1.2
Who can help?

This is the action
<methodAction id="findObjecten" RequiresUpdateModel="true" Action="invokeMethod" MethodName="findObjecten"
                  IsViewObjectMethod="false" DataControl="WozGegevens" InstanceName="WozGegevens"
                  ReturnName="WozGegevens.methodResults.findObjecten_WozGegevens_findObjecten_result">
      <NamedData NDName="bsn" NDType="java.lang.String" NDValue="${bindings.findObjecten_bsn}"/>
</methodAction>and this is the button I press to execute it.
<af:commandButton actionListener="#{bindings.findObjecten.execute}"
                            text="#{viewcontrollerBundle['objectenoverzicht.zoeken']}" id="zoekbutton">
  <af:setActionListener from="#{true}" to="#{HelperBean.refresh}"/>
</af:commandButton>I fiddled a bit with it and I decided to remove the methodAction and just let the button set the boolean HelperBean.refresh to true. That way the iterator is calling the webservice only once, hurray!
I also tried NOT setting the boolean to true, but then the methodAction was performed but the iterator wasn't updated. So that didn't work.
so my button is now this:
          <af:commandButton
                            text="#{viewcontrollerBundle['objectenoverzicht.zoeken']}" id="zoekbutton"
                            >
            <af:setActionListener from="#{true}" to="#{HelperBean.refresh}"/>
          </af:commandButton>I have never before had a button not do anything but submit and set a variable to make data appear on a site. But then again I have never used a webservice data control before. And I will think twice before doing it again
Is this the way it is supposed to work or did I miss something?
The call to the next page is fixed now too by the way, apparently navigation depends on the ability of the iterators to refresh (?).
Edited by: Wendy Tromp on Jan 12, 2012 3:48 PM

Similar Messages

  • Calling SQL*Loader from Forms

    Hi,
    I was wondering if anyone has called SQL*Loader from Forms?
    What I am wanting to do is use Oracle Forms as the interface where you can specify a file that you can import into the database and it will use a set control file. Push the import button and SQL*Loader does the rest.
    Is using Java code to call SQL*Loader from Forms a viable option, or is there an easier way to achieve the desired outcome.
    Any ideas or guidance will be much appreciated.
    Thanks,
    Scott.

    Scott,
    In forms, there's a HOST built-in command which is supposed to execute any o/s commands.
    What you have to do is :
    1. Bult up the string exacltly in the fashion which you will run in o/s
    2. Call the HOST Built-in and pass in the string
    Here's a example :
    Declare
    lOsCmd Varchar2(1000) := Null;
    Begin
    lOsCmd := 'sqlldr user-id=userid/passwd@connectStr '
    || ' control=c:\temp\abc.ctl log=c:\temp\abc.log '
    || ' bad = c:\temp\abc.log';
    Host (lOsCmd, No_Screen);
    End;
    -- Shailender Mehta --

  • Issues in calling Sql Loader through forms developer (10g)

    Hi,
    I am developing a form(in 10g) ,in which I am calling sql loader for loading data onto a oracle database table from external source (e.g. data file is a .CSV file).
    But , somehow the sql loader is not getting executed.
    Here , I am giving the environment settings , approach i am taking;
    This is a distributed system , both the application server,and database server are mounted on two different servers.
    The form is delpoyed on the application server.
    The database table , and the sql loader are configured on the databse side.
    I am using host(<sql loader command>) command to invoke the Operating System command through forms.
    The sql loader is working ok , and the data is getting loaded successfully onto the required database table when I am executing the sql loader command on Unix prompt , but through the forms , it's not working.
    Do I need to change some environmental setting to make this work...
    Any quick help in this regard is highly appreciated.
    Thanks.

    Hi Craig,
    I have already tried out the option of calling sql loader through stored procedure,but this is not working ...
    could you please share any examples to do so ...
    code snippet i am using in forms:
    declare
    usid get_application_property(userid);
    pwd get_application_property(password);
    db get_application_property(host);
    msqlldr varchar2(250);
    begin
    msqlldr:='/u01/oracle/formss/bin/sqlldr' username=<uid/pwd@db> control=<control file name> data=<data file name> log=<log file name>
    hosts(msqlldr);
    end;
    Note that sqlldr command ,for that matter any unix shell command is not working through the hosts() command ...
    could you please suggest any way out ...
    Thanks.

  • Calling SQL Loader through Forms using webutils

    hi all,
    Can anyone tell me how can i call a sqlldr through forms 9i using webutils?Let me know if anyone have a sample script.
    Thanks
    Best Regards,
    Abrar
    [email protected]

    If your middle tier and database server are both unix boxes you could use host(rsh...)
    Are you suggesting webutil because your data to be loaded is on the PC ? If so you probably want to move it then load it as two seperate operations.
    If there isn't too much data you also have the option of using text_io to load it into a forms database block, which has the advantage that the user can see what is happening, and validation rules could be added if required.

  • Calling SQL Loader from Forms 4.5 using HOST command in Win2000

    One of my forms calls SQL Loader 7.3 using HOST command to load a csv file onto the database(Oracle 7.3) under Windows 2000 platform.
    Only after sql loader finishes its operation the control should come to my form i.e. synchronous execution.
    As of now its running asynchronously.
    Is there any way to make it synchronous. If Not any other work arounds?
    Environment Details
    Forms [32 Bit] Version 4.5.10.6.0 (Production)
    Windows 2000 Operating System
    Oracle7 Release 7.3.2.3.2

    Forms6i running on W2000, Rdbms 8.1.7
    in Forms I added a button TEST,
    Trigger when-button-pressed : host('test.bat') ;
    in directory .......\frm I added file test.bat :
    REM ===============
    cd /d C:\........\ldr
    pause
    sqlldr parfile=test.par
    pause
    type test.log
    pause
    exit
    REM ================
    now, pressing TEST button opens DOS window, telling me what's going on, running sqlldr, finally going back to forms
    Are you using NO_PROMPT or NO_SCREEN option of HOST command ?
    Had a look at Forms 4.5 manuals, there is no mentioning of (a)synchronously operation in connection with HOST command.

  • Webservice call from Interactive Adobe form

    Hi,
    Please provide me the possible solution for the below mentioned issue.
    1. Created a webdynpro application.
    2. Kept the interactive form on the VIEW of this WDA. Adobe form has 10 fields and one submit button.
    3. Now created a web service with only one importing parameter of type XSTRING.
    4. I have given the webservice URL in the button properties by making it's type as "Execute"
    Now my question is "How can we get all the filled values on the interactive form in the RFC of Webservice when i click on the submit button?".
    Note: I should not add any other importing fields in the web service except the PDF string.
    Regards,
    Ram

    Hello experts,
    Please provide me the solution for the below mentioned issue.
    I have attached the webservice wsdl file to the SUBMIT button on my form (execute type) and binded all my form fields to the webservice importing structure fields..
    Now the webservice got changed because of the addition of new fields in the common structure.
    And iam uploading the new wsdl file in my existing data connection properties.
    But it is giving an error saying as follows.
    [0]:Page1[0]:Terms_and_conditions[0]:submit[0]:Submit_validate[0]:click
    Error attempting to read from *filehttp://pwxaci.dmzwdf.sap.corp:1080/sap/bc/srt/rfc/sap/yrrprm_webservice/001/yrr_prm_webservice/yrr_prm_webservice*_
    The bold one is the URL of my webservice.
    Please suggest me the correction required if the webservice is changed.
    Regards,
    Ram

  • Calling Report from a Form on the same page

    Hi,
    We have a SEARCH Form and when user inputs search criteria, then we want to call a report on the same page, just below the search button. We tried many things but the report does not show up on the same page, it navigates to next page.
    Please help..
    Thanks
    Kumar.

    I am trying to do a similar thing... I have created a form application component and a Report application component which is called from the search form. This works fine.
    I expose the search form as a component and put it on a portal page. I do the same with the report.
    When I call the page and enter the search params in the form and call the report, the report appears in a separate non-portal window. I would like the report in the same portal page to be run in-line with the new parameters.
    Has anyone done this before?

  • Login details when Webservice is called from Interactive Adobe form

    Hello Experts,
    Can you please suggest me the procedure to overcome the below issue.
    I am calling the Webservice from my interactive adobe form.
    When ever i click on the Submit button on my form, it is triggering the webservice but asking for the login details for authentication in the popup.
    In the real time scenario i will not be having any user id and passwords. So, I don't want this popup.
    What do i need to follow to get this done.
    Regards,
    Ram

    Turn off security on your web service.
    Paul

  • TREX - search via webservice call

    Hi All,
    We would like to access the trex functionality to search in the ECC DMS (Document Management System) via a webservice call.
    I could not yet find any standard defined webservices for this purpose.
    Can anyone tell me whether what I'm searching for exists?
    Kind regards
    Joris

    Hi Joris,
    there are Webservice APIs on the level of EP-KM (here called IMS for "index management services") and on the level of SAP NetWeaver Enterprise Search. The TREX engine itself does not expose any APIs for project development.
    Best, Karsten

  • Calling Sql*Loader from oracle Form builder

    How do i call sql* loader from my forms to import the external data in different formats into my existing database?
    Specify the flexibility of sql* loader to import external data from .txt files or .xls files.
    Would be thankful if certain examples are given along with the answer.

    Hi,
    1. First you have to create seperate ctl (Control files) which maps to different file formats
    2. Using Oracle Forms,
    2a) You can use the 'HOST' command to execute the command line ie. In this case executing
    SQL*Loader script
    2b) You also have the feature in ORACLE forms to read text files and load the data into
    ORACLE db.
    This can be achieved by using TEXT_IO package which comes with ORACLE Forms.
    Hope this helps
    Ta
    Shailender

  • "Error attempting to read file" at Webservice call from Adobe Form.

    Hi Experts,
    We have designed a Webservice form a Function Module in ECC 6.0, In the soamanager transaction the webservice works fine. But at the time of call from the Adobe form, it gives an error stating that "Error attempting to read from file" and then the URL of the Webservice to be excuted.
    and if i attempt to open that file, it gives me this error:
    - <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
      <soap-env:Header />
    - <soap-env:Body>
    - <soap-env:Fault>
      <faultcode>soap-env:Server</faultcode>
      <faultstring xml:lang="en">SRT: Wrong Content-Type and empty HTTP-Body received</faultstring>
    - <detail>
    - <ns:SystemFault xmlns:ns="http://www.sap.com/webas/710/soap/runtime/abap/fault/system/">
      <Host>undefined</Host>
      <Component>COREMSG</Component>
    - <ChainedException>
      <Exception_Name>CX_SOAP_CORE</Exception_Name>
      <Exception_Text>SRT: Wrong Content-Type and empty HTTP-Body received</Exception_Text>
      </ChainedException>
      </ns:SystemFault>
      </detail>
      </soap-env:Fault>
      </soap-env:Body>
      </soap-env:Envelope>
    In case I give my user the "SAP_ALL" role, this all works fine, so i think it is somewhere related to a missing role to be assigned.
    any clues..??
    any help would be appreciated, Please help..
    Thanks,
    Amita

    Hi Juergen,
    I am using it as a WSDL based data connection.
    How do i check this WSDL through a web browser? I have checked it through SICF Transaction code, It gives the output in explorer as given in the first post of this thread..
    Please help me resolving this issue, i feel that this issue is somewhere related to the role assignment of the user as if i provide this user an authorization of SAP_ALL then everything starts working fine, but after removing SAP_ALL this error is encountered, do u hav any pin points on this??
    Thanks
    Amita

  • Webservice call from acrobat form

    Hello guys i hope someone can help me. i'm simply trying to make a simple webservice call when an acrobat pdf form is opened on the server.
    does anyone have any examples or any clear documentation  i tried using the examples on the documentation but im not getting anywhere.
    Thanks
    in advance for your help.

    Hi Juergen,
    I am using it as a WSDL based data connection.
    How do i check this WSDL through a web browser? I have checked it through SICF Transaction code, It gives the output in explorer as given in the first post of this thread..
    Please help me resolving this issue, i feel that this issue is somewhere related to the role assignment of the user as if i provide this user an authorization of SAP_ALL then everything starts working fine, but after removing SAP_ALL this error is encountered, do u hav any pin points on this??
    Thanks
    Amita

  • Calling SQL Loader using HOST command from Developer Forms 4.5

    I want to execute a set of code from D2K Forms 4.5 which has interfface with Client - OS ( In my case Windows NT/XP). I want to execute SQL Loader from Forms using Host Command and then after completion of that process, I want to do next transcations ( depending upond success of HOST/SQL Loader).
    How to achive this?
    I tried writing code like this ...
    l_vc_command := 'sqlldr73'
                        ||' USERID='||l_vc_username||'/'||l_vc_password||'@'||l_vc_connect_string
                        ||' CONTROL='||l_vc_filepath||'Upload.ctl'
                        ||' DATA='||LTRIM(RTRIM(l_vc_fileloc))
                        ||' LOG='||l_vc_filepath|| l_vc_log_file || '_' || l_dt_sysdate_str ||'.log'                    
                        ||' BAD='||l_vc_filepath|| l_vc_bad_file || '_' || l_dt_sysdate_str ||'.bad'
                        ||' DISCARD='||l_vc_filepath|| l_vc_discard_file || '_' || l_dt_sysdate_str ||'.dsc';
    HOST(l_vc_command,NO_PROMPT);
    After this command i want to do some other code execution. so even if it fails or success, next code is executed. How to control this?
    Please help..
    Regards,
    Milind

    Forms6i running on W2000, Rdbms 8.1.7
    in Forms I added a button TEST,
    Trigger when-button-pressed : host('test.bat') ;
    in directory .......\frm I added file test.bat :
    REM ===============
    cd /d C:\........\ldr
    pause
    sqlldr parfile=test.par
    pause
    type test.log
    pause
    exit
    REM ================
    now, pressing TEST button opens DOS window, telling me what's going on, running sqlldr, finally going back to forms
    Are you using NO_PROMPT or NO_SCREEN option of HOST command ?
    Had a look at Forms 4.5 manuals, there is no mentioning of (a)synchronously operation in connection with HOST command.

  • Re-initializing search form

    I have a page that consists of several regions. One region is a form that is used as a search form. You can type in an order number, hit submit, and it takes you to a new page displaying the details for that order. When the back button is pressed, the user wants that search form cleared out, but I can't seem to get it to work. Can someone help me figure out how to clear out the search form when returning from another page.
    Thanks much in advance.

    This question should be posted on the Products > Portal > Search forum.
    When you say hit the back button, do you mean the back button on your browser? If so, its the browser that causes this behaviour not the search form in particular.

  • Oracle 10gR2 WebService Call-In & Call-Out via PL/SQL (Step-by-Step Guide)

    Hi Everyone,
    This guide is for those of you who tried to Call-In and Call-Out WebService via Oracle 10gR2 using PL/SQL but failed a couple of times, re-installed a couple of times and retry, got it to work but don't know what made it work scenarios.
    Hope this helps ;-)
    Thanks,
    Henry Wu
    Instructions on how to use Oracle10gR2 Webservice Call-Out feature (Oracle JAX-RPC DII - Dynamic Invocation (DII) APIs)
    PREREQUISITE
    =================================================================
    1. Download Oracle Database 10g Release 2 (10.2.0.1.0) (ZIP, ~655MB)
    http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
    http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
    1.1 Choose Enterprise Edition
    2. Download 10.1.3.1 Callout Utility for 10g (R1 +R2) RDBMS (ZIP, ~13MB)
    http://download.oracle.com/technology/sample_code/tech/java/jsp/dbws-callout-utility-10131.zip
    2.1 Extract to C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131
    3. Download OC4J Standalone - Oracle Containers for J2EE (OC4J) 10g Release 3 (10.1.3.3) (ZIP, ~93MB; Pure Java—runs on all certified platforms)
    http://www.oracle.com/technology/software/products/ias/index.html (Download Site)
    http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
    3.1 Extract to C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    STEP-BY-STEP PROCEDURES
    =================================================================
    1. Prepare the database
    1.1 Connect to SYS account (or any account that can connect as SYSDBA)
    1.2 alter system set shared_pool_size=96M scope=both
    1.3 alter system set java_pool_size=80M scope=both
    1.4 ALTER USER SCOTT ACCOUNT UNLOCK;
    1.5 ALTER USER SCOTT IDENTIFIED BY "tiger";
    1.6 ALTER USER SCOTT QUOTA UNLIMITED ON USERS;
    1.7 GRANT PUBLIC TO SCOTT;
    1.8 GRANT Create Public Synonym TO SCOTT;
    2. Load Oracle SOAP client to SCOTT (for Oracle 10g Release 2 Database)
    2.1 Commands
    2.1.1 Open command prompt (cmd.exe)
    2.1.2 loadjava -u scott/tiger -r -v -f -genmissing -s -grant public C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\webservices\lib\soap.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\lib\dms.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\jlib\javax-ssl-1_1.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\servlet.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\mail.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\activation.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\http_client.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\ejb.jar
    2.1.3 It will take around 3 minutes and you will see "something" like the following when it completes (count may not be exact) :
    Classes Loaded: 909
    Resources Loaded: 75
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 984
    Errors: 0
    2.1.3 Close this command prompt
    3. Load Oracle JAX-RPC client to SYS (for Oracle 10g Release 2 Database)
    3.1 Commands
    3.1.1 Open command prompt (cmd.exe)
    3.1.2 loadjava -u sys/oracle -r -v -f -genmissing -s -grant public C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\dbwsclientws.jar C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\dbwsclientdb102.jar
    3.1.2.1 It will take around 15 minutes and you will see "something" like following when it completes (count may not be exact) :
    Classes Loaded: 4027
    Resources Loaded: 81
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 61
    Classes skipped: 0
    Synonyms Created: 4108
    Errors: 0
    3.1.3 Close this command prompt
    4. Execute UTL_DBWS packages to SYS (for Oracle 10g Release 2 Database)
    4.1 Commands
    4.1.1 Connect to SYS account only
    4.1.2 Execute the following (in TOAD you should execute them as Script, press the "thunder" button)
    4.2.1 @"C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\utl_dbws_decl.sql"
    4.2.2 @"C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\utl_dbws_body.sql"
    4.2.3 CREATE PUBLIC SYNONYM utl_dbws FOR sys.utl_dbws;
    5. Call-out a free Web Service using SCOTT
    5.1 Commands
    5.1.1 Connect to user SCOTT with password of TIGER
    5.1.2 Copy and Paste the following "Anonymous Block" (sample #1) and execute it :
    5.1.2.1 It sould return "PL/SQL DII client return ===> Redwood City"
    declare
    service_ utl_dbws.SERVICE;
    call_ utl_dbws.CALL;
    service_qname utl_dbws.QNAME;
    port_qname utl_dbws.QNAME;
    operation_qname utl_dbws.QNAME;
    string_type_qname utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params utl_dbws.ANYDATA_LIST;
    l_input_params 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://webservices.imacination.com/distance/Distance.jws';
    -- search for 'service name' in the wsdl
    service_qname := utl_dbws.to_qname(l_namespace, 'DistanceService');
    -- this is just the actual wsdl url
    service_ := utl_dbws.create_service(HTTPURITYPE('http://webservices.imacination.com/distance/Distance.jws?wsdl'), service_qname);
    -- search for 'portType name' in the wsdl
    port_qname := utl_dbws.to_qname(l_namespace, 'Distance');
    -- search for 'operation name' in the wsdl
    -- there will be a lot, we will choose 'getCity'
    operation_qname := utl_dbws.to_qname(l_namespace, 'getCity');
    -- bind things together
    call_ := utl_dbws.create_call(service_, port_qname, operation_qname);
    -- default is 'FALSE', so we make it 'TRUE'
    utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    -- search for 'operation soapAction' under <wsdl:operation name="getCity">
    -- it is blank, so we make it ''
    utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
    -- search for 'encodingstyle' under <wsdl:operation name="getCity">
    utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
    -- search for 'binding style'
    utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    -- 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 := 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
    utl_dbws.add_parameter(call_, 'zip', string_type_qname, 'ParameterMode.IN');
    utl_dbws.set_return_type(call_, string_type_qname);
    -- supply the In Parameter for the web service
    params(0) := ANYDATA.convertvarchar('94065');
    -- invoke the web service
    retx := utl_dbws.invoke(call_, params);
    -- access the returned value and output it to the screen
    retx_string := retx.accessvarchar2;
    dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
    -- release the web service call
    utl_dbws.release_service(service_);
    end;
    5.1.3 Copy and Paste the following "Anonymous Block" (sample #2) and execute it :
    5.1.3.1 It should return "PL/SQL DII client return ===> twelve thousand three hundred and forty five"
    declare
    service_ utl_dbws.SERVICE;
    call_ utl_dbws.CALL;
    service_qname utl_dbws.QNAME;
    port_qname utl_dbws.QNAME;
    operation_qname utl_dbws.QNAME;
    string_type_qname utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params utl_dbws.ANYDATA_LIST;
    l_input_params utl_dbws.anydata_list;
    l_result ANYDATA;
    l_namespace VARCHAR2(1000);
    begin
    -- open internet explorer and navigate to http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL
    -- search for 'targetNamespace' in the wsdl
    l_namespace := 'http://www.dataaccess.com/webservicesserver/';
    -- search for 'service name' in the wsdl
    service_qname := utl_dbws.to_qname(l_namespace, 'NumberConversion');
    -- this is just the actual wsdl url
    service_ := utl_dbws.create_service(HTTPURITYPE('http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL'), service_qname);
    -- search for 'portType name' in the wsdl
    port_qname := utl_dbws.to_qname(l_namespace, 'NumberConversionSoap');
    -- search for 'operation name' in the wsdl
    -- there will be a lot, we will choose 'NumberToWords'
    operation_qname := utl_dbws.to_qname(l_namespace, 'NumberToWords');
    -- bind things together
    call_ := utl_dbws.create_call(service_, port_qname, operation_qname);
    -- default is 'FALSE', so we make it 'TRUE'
    utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    -- search for 'operation soapAction' under <operation name="NumberToWords">
    -- it is blank, so we make it ''
    utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
    -- search for 'encodingstyle'
    -- cannot find xml tag 'encodingstyle', so we just use the following as the generic encoding style
    utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
    -- search for 'binding style'
    -- although 'document' was used, it produced an error, thus we will use 'rpc'
    -- this value is generally only 'document' or 'rpc'
    utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    -- search for 'xmlns:xs' to know the value of the first parameter
    -- under <xs:element name="NumberToWords"> you will see the line <xs:element name="ubiNum" type="xs:unsignedLong" />
    -- thus the return type is 'unsignedlong', removing 'xs:'
    -- however, upon testing, using 'unsignedlong' produced an error, while 'string' did not, so we will use 'string'
    string_type_qname := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    -- under <xs:element name="NumberToWords"> you will see the line <xs:element name="ubiNum" type="xs:unsignedLong" />
    -- the element name is 'ubiNum', thus we put in 'ubiNum'
    -- 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 utl_dbws package
    utl_dbws.add_parameter(call_, 'ubiNum', string_type_qname, 'ParameterMode.IN');
    utl_dbws.set_return_type(call_, string_type_qname);
    -- supply the In Parameter for the web service
    params(0) := ANYDATA.convertvarchar('12345');
    -- invoke the web service
    retx := utl_dbws.invoke(call_, params);
    -- access the returned value and output it to the screen
    retx_string := retx.accessvarchar2;
    dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
    -- release the web service call
    utl_dbws.release_service(service_);
    end;
    NOTES AND REFERENCES
    =================================================================
    This detailed step-by-step guide was produced with the following guide http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
    I could still not load Oracle JAX-RPC client to SCOTT (step 4) as it produces an error. See the following for more details :
    http://forums.oracle.com/forums/thread.jspa?threadID=633219&tstart=0
    Also, I could not consume some of the other free Web Services out there for reasons I don't know, hope someone can help clarify. See the following for more details :
    http://forums.oracle.com/forums/thread.jspa?threadID=630733&tstart=0
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Instructions on how to use Oracle10gR2 Webservice Call-In feature
    PREREQUISITE
    =================================================================
    1. Download Oracle Database 10g Release 2 (10.2.0.1.0) (ZIP, ~655MB)
    http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
    http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
    1.1 Choose Enterprise Edition
    2. Download OC4J Standalone - Oracle Containers for J2EE (OC4J) 10g Release 3 (10.1.3.3) (ZIP, ~93MB; Pure Java—runs on all certified platforms)
    http://www.oracle.com/technology/software/products/ias/index.html (Download Site)
    http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
    2.1 Extract to C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    STEP-BY-STEP PROCEDURES
    =================================================================
    1. Connect to SYS account and create user STORE
    CREATE USER store IDENTIFIED BY store;
    GRANT connect, resource TO store;
    2. Connect to Oracle using the user STORE and password STORE
    CONNECT store/store;
    3. Execute the following objects for this excercise
    CREATE SEQUENCE order_sq;
    CREATE TABLE product_types (
    product_type_id INTEGER
    CONSTRAINT product_types_pk PRIMARY KEY,
    name VARCHAR2(10) NOT NULL
    CREATE TABLE products (
    product_id INTEGER
    CONSTRAINT products_pk PRIMARY KEY,
    product_type_id INTEGER
    CONSTRAINT products_fk_product_types
    REFERENCES product_types(product_type_id),
    name VARCHAR2(30) NOT NULL,
    description VARCHAR2(50),
    price NUMBER(5, 2)
    CREATE TABLE customers (
    customer_id INTEGER
    CONSTRAINT customers_pk PRIMARY KEY,
    first_name VARCHAR2(10) NOT NULL,
    last_name VARCHAR2(10) NOT NULL,
    dob DATE,
    phone VARCHAR2(12)
    CREATE TABLE orders (
    order_id INTEGER
    CONSTRAINT orders_pk PRIMARY KEY,
    product_id INTEGER
    CONSTRAINT purchases_fk_products
    REFERENCES products(product_id),
    customer_id INTEGER
    CONSTRAINT purchases_fk_customers
    REFERENCES customers(customer_id),
    quantity INTEGER NOT NULL
    INSERT INTO customers (
    customer_id, first_name, last_name, dob, phone
    ) VALUES (
    1, 'John', 'Brown', '01-JAN-1965', '800-555-1211'
    INSERT INTO product_types (
    product_type_id, name
    ) VALUES (
    1, 'Book'
    INSERT INTO products (
    product_id, product_type_id, name, description, price
    ) VALUES (
    1, 1, 'Modern Science', 'A description of modern science', 19.95
    COMMIT;
    CREATE OR REPLACE PACKAGE dbfunc AS
    FUNCTION place_order (
    p_product_id INTEGER,
    p_customer_id INTEGER,
    p_quantity INTEGER
    RETURN VARCHAR2;
    END dbfunc;
    CREATE OR REPLACE PACKAGE BODY dbfunc AS
    FUNCTION place_order (
    p_product_id INTEGER,
    p_customer_id INTEGER,
    p_quantity INTEGER
    RETURN VARCHAR2 IS
    v_customer_count INTEGER;
    v_product_count INTEGER;
    v_order_id INTEGER;
    BEGIN
    -- count the number of products with the
    -- supplied p_product_id (should be 1 if the product exists)
    SELECT COUNT(*)
    INTO v_product_count
    FROM products
    WHERE product_id = p_product_id;
    IF v_product_count = 0 THEN
    RETURN 'No such product';
    END IF;
    -- count the number of customers with the
    -- supplied p_customer_id (should be 1)
    SELECT COUNT(*)
    INTO v_customer_count
    FROM customers
    WHERE customer_id = p_customer_id;
    IF v_customer_count = 0 THEN
    RETURN 'No such customer';
    END IF;
    -- get the next value from orders_sq
    SELECT order_sq.nextval
    INTO v_order_id
    FROM dual;
    -- place the order
    INSERT INTO orders (
    order_id, product_id, customer_id, quantity
    ) VALUES (
    v_order_id, p_product_id, p_customer_id, p_quantity
    COMMIT;
    RETURN 'Order placed with id of ' || v_order_id;
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    RETURN 'Order not placed';
    END place_order;
    END dbfunc;
    4. Install and Configure OC4J
    4.1 Change Directory
    4.1.1 Open command prompt (cmd.exe)
    4.1.2 CD C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\bin
    4.2 Configure Environment variables (type in command prompt)
    4.2.1 set JAVA_HOME=C:\oracle\product\10.2.0\db_1\jdk
    4.2.2 set ORACLE_HOME=C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    4.3 Starting OC4J for the first time
    4.3.1 oc4j -start
    4.3.2 If this is not your first time to "start" oc4j, go to step 4.3.4
    4.3.3 Set oc4jadmin password (use the password "oracle" w/o the quotation marks)
    08/03/21 17:13:54 Set OC4J administrator's password (password text will not be displayed as it is entered)
    Enter password:
    Confirm password:
    Confirm password: The password for OC4J administrator "oc4jadmin" has been set.
    08/03/21 17:14:01 The OC4J administrator "oc4jadmin" account is activated.
    4.3.4 OC4J has started if you see the message :
    08/03/21 17:14:16 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    4.3.5 Leave this command prompt open
    4.4 Configure Data Source
    4.4.1 Open a new command prompt via the cmd.exe command
    4.4.2 type "hostname" and then press enter
    4.4.3 Keep this command prompt open for later use
    4.4.4 Open Windows Explorer and navigate to the folder C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config
    4.4.5 Open the file data-sources.xml
    4.4.6 Modify and Save the file so that it will look something like the following :
    4.4.6.1 Note that "hpv2710us" is my hostname found in step 4.4.2
    4.4.6.2 Note that "ORCLDEV" is the name of my Oracle Instance. (Default installation uses ORCL only)
    <connection-pool name="Example Connection Pool">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource"
    user="store"
    password="store"
    url="jdbc:oracle:thin:@//hpv2710us:1521/ORCLDEV">
    </connection-factory>
    </connection-pool>
    4.4.7 Close the text editor
    4.4.8 Close the Windows Explorer
    4.4.9 Close this command prompt (type exit)
    5. Publishing a PL/SQL Package as a Database Web Service
    5.1 Create the config.xml file
    5.1.1 Open Notepad.exe
    5.1.2 Copy and Paste the following :
    5.1.2.1 Note that "hpv2710us" is my hostname found in step 4.4.2
    5.1.2.2 Note that "ORCLDEV" is the name of my Oracle Instance. (Default installation uses ORCL only)
    <web-service>
    <display-name>PLSQL Web Service</display-name>
    <description>PLSQL Sample</description>
    <destination-path>./dbfunc.ear</destination-path>
    <temporary-directory>/tmp</temporary-directory>
    <context>/plsqlsample</context>
    <stateless-stored-procedure-java-service>
    <jar-generation>
    <schema>store/store</schema>
    <db-url>jdbc:oracle:thin:@hpv2710us:1521:ORCLDEV</db-url>
    <prefix>db.func.place.order</prefix>
    <db-pkg-name>dbfunc</db-pkg-name>
    </jar-generation>
    <uri>/dbfunc</uri>
    <database-JNDI-name>jdbc/OracleDS</database-JNDI-name>
    </stateless-stored-procedure-java-service>
    <wsdl-gen>
    <wsdl-dir>wsdl</wsdl-dir>
    <option name="force">true</option>
    <option name="httpServerURL">http://localhost:8888</option>
    </wsdl-gen>
    <proxy-gen>
    <proxy-dir>proxy</proxy-dir>
    <option name="include-source">true</option>
    </proxy-gen>
    </web-service>
    5.1.3 Save file as config.xml in the directory C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config
    5.1.3.1 Note it should be config.xml and not config.txt
    5.1.4 Close the text editor
    5.2 Publish dbfunc Oracle Package as a Web Service
    5.2.1 Open a new command prompt via the cmd.exe command
    5.2.2 CD C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home
    5.2.3 mkdir ear
    5.2.4 CD ear
    5.2.5 set ORACLE_HOME=C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    5.2.6 set CLASSPATH=.;%ORACLE_HOME%\webservices\lib\wsdl.jar;%ORACLE_HOME%\lib\xmlparserv2.jar;%ORACLE_HOME%\soap\lib\soap.jar
    5.2.7 java -jar %ORACLE_HOME%\webservices\lib\WebServicesAssembler.jar -config C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config\config.xml
    Please wait ...
    STORE.DBFUNC
    5.2.8 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -deploy -file C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\ear\dbfunc.ear -deploymentName dbfunc
    08/03/21 17:46:23 Notification ==>Application Deployer for dbfunc COMPLETES. Operation time: 296 msecs
    5.2.9 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -bindWebApp -appname dbfunc -webModuleName dbfunc_web
    5.2.10 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -bindAllWebApps -appname dbfunc
    5.2.11 Close this command prompt (type exit)
    6. Test dbfunc Web Service
    6.1 Restart OC4J
    6.1.1 Open the command prompt you used to start OC4J in step 4.1.1/4.3.1
    6.1.2 In the keyboard, hit Ctrl+C
    6.1.2.1 Type "Y" and then hit Enter
    08/03/21 18:02:51 Shutting down OC4J...
    Terminate batch job (Y/N)? Y
    6.1.2.2 Note that the command prompt should still be open
    6.1.2.2.1 If you accidentally closed the command prompt just do the following
    6.1.2.2.1.1 Do 4.1.1 to 4.2.2 and then proceed to 6.1.3
    6.1.3 oc4j -start
    Starting OC4J from C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home...
    08/03/21 18:07:57 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    6.1.4 Leave this command prompt open
    6.2 Use the Web Service to "Order an Item"
    6.2.1 Connect to Oracle using the user STORE and password STORE
    6.2.2 select * from orders
    6.2.2.1 Zero row should return
    6.2.3 Open Internet Explorer
    6.2.4 Navigate to http://localhost:8888/plsqlsample/dbfunc
    6.2.5 Input the following :
    6.2.5.1 param0 value: 1
    6.2.5.2 param1 value: 1
    6.2.5.3 param2 value: 10
    6.2.6 Click the Invoke button
    6.2.7 A pop-up window will appear having the following contents :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <ns1:placeOrderResponse xmlns:ns1="http://db.func.place.order/dbfunc.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="xsd:string">Order placed with id of 1</return>
    </ns1:placeOrderResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    6.2.8 Go back to SQLPLUS or Toad and execute "select * from orders" again
    6.2.8.1 There should be one row
    ORDER_ID, PRODUCT_ID, CUSTOMER_ID, QUANTITY
    1, 1, 1, 10
    NOTES AND REFERENCES
    =================================================================
    This detailed step-by-step guide was produced with the following article by Jason Price http://www.oracle.com/technology/pub/articles/price_10gws.html

    Success!!!
    I had to grant this permissions:
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'getClassLoader', '' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar', '' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'setFactory', '' )
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.util.PropertyPermission', 'HTTPClient.socket.idleTimeout', 'write' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', '127.0.0.1:8084', 'connect,resolve' );
    As I wrote earlier, WS_TEST is my user into which I load JAX-RPC client. Note that, if you load JAX-RPC client into user another than SYS, you have NOT to use -s -grant public option (wassam wrote about this too). Another thing is that I (finally) didn't load OC4J. To consume WebService I use utl_dbws.invoke(call_Handle CALL, request SYS.XMLTYPE) function.
    voytec001

Maybe you are looking for