How get java Object from webservice

Hai
i gave ArrayList<bean> , i can't get this ArrayList<bean> from webservice. How can i get ? via for each or iterator or any ?????
Note: i iterated  but only one element was come from bean property  using next() of iterator .
I need all property. any one please help.
thanks
Mr...Javan

Try to return an Array instead of an ArrayList?
Have a look at http://forums.sun.com/thread.jspa?forumID=331&threadID=5289022.

Similar Messages

  • How can i return an object isn't java object from webservice????

    Hi !
    I have a problem in my Project. When i call method return a java object from webservice , it 's too easy. But when i create my own object (ex:ClientRequest.class) , it doesn't work exactly T_T . When i return that object (on client, doesn't have ClientRequest.class) , i cann't access its static variables.
    How can i do it ??
    Please help me !
    Thanks a lot !!!!!
    class ClientRequest {
    public static int i;
    public static String s;
    public ClientRequest() {
    }

    You can use REFCURSOR type for this. In java SQL TYPES this is available too. In your PLSQL use REFCURSOR for that array and then take the same from java code. Look in the servelet programming book for this SQLTYPE and see PLSQL for handling refcursors. We have done this way and it works.

  • How get SPWeb object from web exact url

    Hi,
    I have site collection object and its sub-web exact url. I want to get SPWeb object by using exact web url. I try SPSite.OpenWeb(string,bool) function by passing this excat url, but it throw an exception ie invalid character near ':'.
    SPSite.url = http://servername/site1
    subsite url is http://servername/site1/site2/site3. I need web object against subsite url.

    Hi,
    Thanks for the reply. Steven's answer help me.
    I also learned one more thing here. By providing your current web's exact url in SPSite constructor will create an instance of site of current web. But site.OpenWeb() will return the web object corresponding to provided url, not the web object of site url.
    using(SPSite site = new SPSite("http://servername/site1/site2/site3"))
          using(SPWeb web = site.OpenWeb())
    Here  site Url is http://servername/ and site.OpenWeb() return SPweb object against "http://servername/site1/site2/site3".

  • How to reference multiple instances of the same Java object from PL/SQL?

    Dear all,
    I'm experimenting with calling Java from PL/SQL.
    My simple attempts work, which is calling public static [java] methods through PL/SQL wrappers from SQL (and PL/SQL). (See my example code below).
    However it is the limitation of the public static methods that puzzels me.
    I would like to do the following:
    - from PL/SQL (in essence it needs to become a forms app) create one or more objects in the java realm
    - from PL/SQL alter properties of a java object
    - from PL/SQL call methods on a java object
    However I fail to see how I can create multiple instances of an object and reference one particular object in the java realm through public static methods.
    My current solution is the singleton pattern: of said java object I have only 1 copy, so I do not need to know a reference to it.
    I can just assume that there will only ever be 1 of said object.
    But I should be able to make more then 1 instance of an object.
    To make it more specific:
    - suppose I have the object car in the java realm
    - from PL/SQL I want to create a car in the java realm
    - from PL/SQL I need to give it license plates
    - I need to start the engine of a scpecific car
    However if I want more then 1 car then I need to be able to refrence them. How is this done?
    Somehow I need to be able to execute the following in PL/SQL:
    DECLARE
    vMyCar_Porsche CAR;
    vMyCar_Fiat CAR;
    BEGIN
    vMyCar_Porsche = new CAR();
    vMyCar_Fiat = new CAR();
    vMyCar_Porsche.setLicensePlates('FAST');
    vMyCar_Porsche.startEngine();
    vMyCar_Fiat.killEngine();
    END;
    Thanks in advance.
    Best Regards,
    Ruben
    My current example code is the following:
    JAVA:
    ===
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED CODAROUL."RMG/BO/RMG_OBJECT" as package RMG.BO;
    public class RMG_OBJECT {
    private static RMG_OBJECT instance = new RMGOBJECT();
    private String rmgObjectNaam;
    private RMG_OBJECT(){
    this.rmgObjectNaam = "NonDetermined";
    public static String GET_RMGOBJECT_NAAM () {
    String toestand = null;
    if (_instance == null) {toestand = "DOES NOT EXIST";} else { toestand = "EXISTS";};
    System.out.println("instance : " + toestand);
    System.out.println("object name is : " + _instance.rmgObjectNaam);
    return _instance.rmgObjectNaam;
    public static Integer SET_RMGOBJECT_NAAM (String IN)
    try
    _instance.rmgObjectNaam = IN;
    return 1;
    catch (Exception e)//catch
    System.out.println("Other Exception: " + e.toString());
    e.printStackTrace();
    return 5;
    } //catch
    PL/SQL Wrapper:
    ==========
    CREATE OR REPLACE FUNCTION CODAROUL.SET_RMGOBJECT_NAAM(NAAM IN VARCHAR2) return NUMBER AS
    LANGUAGE JAVA NAME 'RMG.BO.RMG_OBJECT.SET_RMGOBJECT_NAAM (java.lang.String) return java.lang.Integer';
    Calling from SQL:
    ==========
    CALL dbms_java.set_output(2000);
    select CODAROUL.GET_RMGOBJECT_NAAM() from dual;
    Edited by: RubenS_BE on Apr 6, 2012 5:35 AM
    Edited by: 925945 on Apr 6, 2012 5:41 AM

    You can do this by manually creating a new iterator binding in your binding tab.
    So instead of dragging the VO directly to the page, go to the binding tab, add a new executable iterator binding, and point to that one from your ELs in the page itself.

  • How can I drop the java objects from a schema

    hi..good afternoon all...
    How can I drop the java objects from a database schema???
    suppose the credentials are scott/tiger@db1
    Another thing is that...I have to do this from cmd(command prompt) as there is no plsql developer or sqldeveloper installed in the machine.
    plss help...thanks in advance...

    hi...i have already tried all the options..but it is showing the error..
    ora:01435 - user does not exist
    but when i have given the command...
    select object type, object_name, status from user_objects where object_type like'%JAVA%';
    then it is showing that the java_object is present....
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    SQL>
    SQL>
    SQL> set linesize 200
    SQL>
    SQL>
    SQL>
    SQL> select object_type, object_name, status from user_objects where object_type
    like '%JAVA%';
    OBJECT_TYPE OBJECT_NAME
    STATUS
    JAVA CLASS javaclass1
    VALID
    JAVA SOURCE javaclass1
    VALID
    SQL> drop java source javaclass1.java;
    drop java source javaclass1.java
    ERROR at line 1:
    ORA-01435: user does not exist
    SQL>

  • Getting an object from HttpSession...

    Hi all,
    I am stuck which is according to me is very obvious...please correct me if I am wrong.
    I have a java.util.ArrayList object in my HttpSession object.
    Now in my helper class to which the request is passed from the servlet I am extracting this ArrayList object in one ArrayList object and putting it into the HashMap. After this, I am again extracting this ArrayList object from the HttpSession and assigning it to a newly created ArrayList object in my helper class. Now I am passing this newly created ArrayList object to a method. This method after processing changes this ArrayList object. And finally I am putting this changed ArrayList object in the HashMap I created earlier.
    After doing all this, when I am trying to extract and print these ArrayList Objects from the session object...I found my first ArrayList object has also been affected by the same change as the second one. The expected result was only the second object will be changed. I am stuck with this.
    I know it has something to do with references....but I am not able to understand that when I am trying to create two new copies by extracting an object from the Session...and changing one how is my second object getting affected. Any help will be appriciated.
    The code for this is as follows:
    "phSessionState" is a collection object in HttpSession which holds all the other objects. We are not putting different objects directly in the HttpSession.
    "LineObject" is a simple JavaBean kind of class with gettrs and setters
    ArrayList originalList = (ArrayList)phSessionState.getData("lineObjectList");
    HashMap stagedLineObjects = new HashMap();
    stagedLineObjects.put("OriginalList", originalList);
    //Extracting same in another object and calling a method to update it.
    ArrayList tempList = (ArrayList)phSessionState.getData("lineObjectList");
    //Method to update the ArrayList
    updateLineObjectList(tempList, request);
    stagedLineObjects.put("UpdatedList", tempList);
    //Trying to get the objects from the HashMap and print
    System.out.println("Retriving OriginalList...");
    ArrayList List1 = (ArrayList)stagedLineObjects.get("OriginalList");
    for(int i=0; i<List1.size(); i++)
         LineObject lo = (LineObject)List1.get(i);
         System.out.println(lo.getUserID() + "\t" + lo.getPassword()
    + "\t" + lo.getFirstName() + "\t" + lo.getMiddleName() + "\t" +
    lo.getLastName());
    System.out.println("Retriving UpdatedList...");
    ArrayList List2 = (ArrayList)stagedLineObjects.get("UpdatedList");
    for(int i=0; i<List2.size(); i++)
         LineObject lo = (LineObject)List2.get(i);
         System.out.println(lo.getUserID() + "\t" + lo.getPassword()
    + "\t" + lo.getFirstName() + "\t" + lo.getMiddleName() + "\t" +
    lo.getLastName());
    Waiting for your valuable help...
    Thanks & Regards,
    Gauz

    You must remember that objects are passed by reference. So when you are passing around your ArrayList, you are actually passing a reference to the ArrayList. In other words, there exists one instance of your specific ArrayList in memory and what you are passing around are copies of the "reference" to that memory location.
    If you want to pass a copy of your ArrayList, you can create a copy of the ArrayList and pass the reference to that new copy. One way to do this is as follows:ArrayList originalList = new ArrayList();
    //Let's put two objects into the ArrayList
    originalList.add(1, new StringBuffer("object1"));
    originalList.add(2, new StringBuffer("object2"));
    //Now let's copy the ArrayList
    ArrayList copyOfList = new ArrayList(originalList);
    //now, you have two copies of the ArrayList.  You can make
    //changes to copyOfList without affecting originalList
    copyOfList.add(3, new StringBuffer("object3"));
    //Checking the size of each ArrayList will demonstrate a difference
    System.out.println("Original's size is " + originalList.size());
    System.out.println("Copy's size is " + copyOfList.size());
    //Output should be:
    //  Original's size is 2
    //  Copy's size is 3Please keep in mind that the objects within the ArrayList are also being passed by reference. So if you modify an object within originalList, those modifications will be reflected in the same object found in copyOfList.
    For example,StringBuffer sb = (StringBuffer)copyOfList.get(1);
    sb.append(":modified");
    //Now print the values of the first object in each ArrayList
    StringBuffer sbFromOriginal = (StringBuffer)originalList.get(1);
    StringBuffer sbFromCopy = (StringBuffer)copyOfList.get(1);
    System.out.println("Original's value is " + sbFromOriginal.toString());
    System.out.println("Copy's value is " + sbFromCopy.toString());
    //Your output should read
    //  Original's value is object1:modified
    //  Copy's value is object1:modifiedThis is because you made a copy of the ArrayList, but not a copy of each object within the ArrayList. So you actually have two seperate copies of ArrayList but they are referencing the same two objects in positions 1 and 2. The object in position 3 exists only in copyOfList.
    Hope this helps.

  • Access Java object from Javascript

    Hi
    I'm trying to invoke a Java object from Javascript (scriptengine and all that).
    I want to add scripting features to a GeneXus Java generated app... and I have very basic skills on java too. Sorry for that ;o).
    This is the java code to pass "params" to the scriptengine:
    engine.put("remoteHandle",remoteHandle);
    engine.put("context", context); The remoteHandle (int) and context (com.genexus.ModelContext) pass trough all the gx-java generated programs.
    This javascript works fine:
    importClass(Packages.uftestjs);
    new uftestjs(remoteHandle).execute( ) ;The remoteHandle conversion is ok (javascript-number to int). The context is optional.
    But if I want to pass context:
    importClass(Packages.uftestjs);
    new uftestjs(remoteHandle, context).execute( ) ;Fails with this:
    "javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Java constructor for 'uftestjs' with arguments 'number,javax.script.SimpleScriptContext' not found."
    Obviously, no conversion is possible with context (javax.script.SimpleScriptContext to com.genexus.ModelContext).
    There is some way to reference de original context, by the object Id??? or something like that???
    Thanks in advance for any replies!!!
    Greetings from Chile. (I hope you can understand my english!)

    Hi
    Well, since this topic is about java programming I think the place is right here.
    (I use some tricks to embed java statements in genexus objects...)
    I will try to get some help at Artech (GX) on how to build something... to get the conversion needed.
    But they are not focussed on support this kind of questions.
    Anyway, I want to know: do I can to reference an object by the objId?
    I want to code something like this:
    com.genexus.ModelContext context =
                     (com.genexus.ModelContex)getTheObjectFromTheJVM(theObjectId);(powered by google translator, ha!)

  • 2 TopLink Java Object from Table to be used in single selectOneChoice

    Hello everyone, can I ask for help on how to solve my problem....
    Here's my scenario, I have 2 tables namely tblCollege and tblCourse, they are related through tblCourse.CollegeCode = tblCollege.Code.
    I use the jdeveloper wizard using TopLink -> Java Object from Table to add these table to my project. I created an EJB Data Control so that I can use them to my Userinterface using ADF Faces.
    What I really want to do is that I need to have selectOneChoice component displaying:
    tblCollege.Name + tblCourse.Name, and it should have a value of tblCollege.Code + tblCourse.Code,
    so for example in my
    tblCollege:
    Code---------Name
    1---------------Science
    2---------------Music
    tblCourse
    Code-------Name-----------CollegeCode
    1-------------Biology----------1
    2-------------Computer-------1
    3-------------Guitar------------2
    what I want in my selectOneChoice is like this:
    value----------display
    1-1--------------Science-Biology
    1-2--------------Science-Computer
    2-3--------------Music-Guitar
    I'm a little stuck on how I'm going to that. Thanks.

    Bawasi,
    I see a couple of angles of attack, but this really depends on the technologies involved. If you are using ADF Bindings in combination with ADF Faces then you need to shape the data at the entity level. If ADF Bindings are no the in equation, you can take a less aggressive approach and shape the data in a managed bean. What is not clear to me is the end-to-end use-case. I see the read-only (i.e. how to get data to the drop box), but I am
    not certain what attribute on an entity you are attempting to set. Are you trying to set the course for the current user or for a master schedule? Finally, notice that the final shape of your data set shows a unique combinations, you could increase the performance of your use-case and ease of development simply by denormalizing your schema.
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Reference HttpServlet object from webservice method ...

    How to reference HttpServlet object from webservice method to access HTTP header?
    Thanks
    Marcel

    You are correct.
    I know that SOAP messages can be send not only via HTTP protocol.
    Our solution is restricted to use only HTTP protocol for communication between client and server by customer, because there is implemented transparent proxy for users authorization and strong security of communication via HTTP protocol. Authorization server transparently modify HTTP request header with user identity (DN from user certificate - with this PKI solution it is not possible to use standard SSL because certificate is proprietary enhanced and cannot be accessed in standard way). That is why I need access HTTP request header.
    Why I want to use webservices? I thing that webservice is flexible and perspective technology for integration and asynchronous communication between web clients and application (it is really more effective add new info in web page asynchronously from webservice than reload whole page).
    Thanks
    Marcel

  • Dropping java object from Oracle 8i

    We areaable to load java methods and publish them to SQL in Oracle 8i using Jdev Deploy wizard, but we can not drop them thru
    Open View As->Database Browser of the connection object, they drop menu is greyed out/disable. What kind privilege we need to drop java object from Oracle 8i? Or there is something wrong with the database setup.
    Thank you very much

    There are three options:
    Normal
    SysDBA
    SysOper
    I have tried the three of them, none of them works, is there third option SYS?
    Thank you very much.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Amit:
    Log in as SYS.<HR></BLOCKQUOTE>
    null

  • How to transport objects from one server to another server?

    How to transport objects from one server to another server.ie..from development to testing sewrver....

    Hi Manoj,
    Check these links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/93/a3a74046033913e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a8/5e56006c17e748a68bb3843ed5aab8/frameset.htm
    Transporting Objects IR ID using CMS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f85ff411-0d01-0010-0096-ba14e5db6306
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e1/69a740aa053a13e10000000a155106/frameset.htm
    You can choose either File transfer methor or CMS. File transfer method is the simplest.
    Sachin

  • Accessing java objects from within javascript

    Hello,
    Anyone with an idea of a useful toolkit for accessing java objects from within javascript will be much appreciated.
    Thanks in advance,
    Antana.

    What do you mean by accessing Java objects? Do you mean interacting with an applet via JavaScript? Something else?

  • How get browser URL from portlet JSR-168?

    I use Oracle Portal. And I have problem.
    How get browser URL from portlet JSR-168?

    Normaly it is
    http://server:port/portletContextRoot
    Did you create the portlet with JDeveloper? When you dpeloy the portlet to your application server, JDeveloper should output the URL of the portlet test page in the deployment output feedback.

  • 32-bit JVM receiving Java objects from 64-bit JVM

    Hi folks,
    Question is: will there be problems for 32-bit JVM receiving Java objects from 64-bit JVM? and vice versa.
    Our application client is running on 32-bit JVM, our server is running on 64-bit JVM. Client will send Java objects to server, and vice versa.
    My past experience suggested when sending Java objects between client and server, both client and server needs to be compiled under the same JVM version. Any advice?
    Christy

    My past experience suggested when sending Java
    objects between client and server, both client and
    server needs to be compiled under the same JVM
    version. Any advice?This is only a case if you omit explicit serialVersionUID. My advice is to ALWAYS specify it for classes you want to serialize over the wire or put into persistent storage. It is way too tricky to rely on default one to fail half a year later when some new programmer adds one new public method to a class.
    Unless you need to deserialize already existing resources, there is no need to put any magic number in serialVersionUID - just put 1 for every class you create and possibly increase it by 1 every time you want to make incompatible version (which is not happening so often, as in real world you often try to stay as compatible as possible)

  • How to get stylesheet object from JAVA RESOURCE stored in DB

    Hi,
    I stored a xslt file in the database and have a JAVA RESOURCE file now. How can i get a stylesheet object from this resource file?
    I took the following class to get an impression how to get the contents of the resource but -although the name of the resource was spelled correctly- i got a file not found exception.
    Whats wrong?
    public class PrintRessource {
    public static void print (String p_ressource){
    try {
    Class c = PrintRessource.class;
    System.out.println(c.toString());
    InputStream file = c.getResourceAsStream(p_ressource);
    if (file == null)
    throw new FileNotFoundException("XSLT file not in DB");
    byte[] buffer = new byte[4096];
    int bytes_read;
    while ((bytes_read = file.read(buffer)) != -1)
    System.out.println(new String(buffer, 0 , buffer.length));
    catch (Exception exp) {
    System.out.println(exp);
    Thanks

    The code works as is. I just forgot to add the slash in front of the Resource file name.

Maybe you are looking for

  • How can i open and read  a books from i store on my mac

    Hi I whant to buy a books in i store and read them on my mac , but books are only for ipad and iphone , how can i do this

  • PDF Thumnbnail preview PROBLEM (Windows 7 x32)

    I have problems now with my adobe reader thumbnail preview. This started when I had unistall my Adobe Photoshop cs5 white rabbit to replace with Adobe Photoshop CS5 Extended. When I uninstalled it with Revounistaller, the thumbnail preview for my pdf

  • Problem with access rights in web forms

    <p>Hi</p><p>i am facing the problem in giving access rights to users inplanning application.</p><p>i gave write access to all my forms and all my users were giveninteractives user access.</p><p>but when users tried to open to the forms. they are gett

  • DB13 fails because of MEDIANAME does not match

    Hi SDN, while configure DB13, first job runs perfectly but when it runs a week later it fails because of an MEDIANAME does not match error Duration:  0 hours, 0 minutes, 0 seconds                        Last msg:  Executed as user: NT AUTHORITY\SYSTE

  • How to make a thread NOT get interrupted by the CPU?

    Hello. Ok, maybe this might sound trivial, or may expose a fundamental lack in my understand of concurrency... But heres my problem. I have 2 threads running, both of the same type. After hours of breaking my head, I found out that the reason my prog