THE FUNCTION USED IN METHOD IS UNAVAIBLE

I have created a java program that works fine succesfully but when I try to publish as webservice, the method which I want to expose, is not available.
I need that my service returns an array in order to bring table rows for a web service client.
Can anybody help me about it? Anybody have any ideas to help me solve this problem?
Thanks regards,
Simone.
My program:
import java.sql.*;
import java.util.Arrays;
import java.util.List;
import java.util.Vector;
public class LOORACLE
public LOORACLE(){
public class LO
public int lo;
     public String tit;
LO[] retOracle;
public LO[] getRegistrosOracle()
     Connection con;
     Statement stmt;
ResultSet uprs;
String urlOracle = "jdbc:oracle:thin:@139.82.120.4:1521:ORCL";
try
Class.forName("oracle.jdbc.driver.OracleDriver"); }
catch(java.lang.ClassNotFoundException e)
{ System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try
con = DriverManager.getConnection(urlOracle, "WS", "WS1");
stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
uprs = stmt.executeQuery("SELECT * FROM LO_GERAL");
int i=0;
uprs.beforeFirst();
while(uprs.next())
          i++;
retOracle = new LO;
i=0;
uprs.beforeFirst();
while (uprs.next())
retOracle[i] = new LO();
retOracle[i].lo = uprs.getInt("codlo");
retOracle[i].tit = uprs.getString("titulo");
System.out.println(retOracle[i].tit + " " + retOracle[i].tit);
i++;
uprs.close();
stmt.close();
     con.close();
catch(SQLException e)
     System.err.println(e.getMessage());
return retOracle;

I think your problem is
public class LO
public int lo;
public String tit;
In order to return an array of objects, those objects have to be JavaBeans and the JavaBeans have to implement java.io.Serializable.
A version of your class that should work would be:
public class LO implements java.io.Serializable
int lo;
String tit;
public LO()
public int getLo()
return lo;
public void setLo(int newLo)
lo = newLo;
public String getTit()
return tit;
public void setTit(String newTit)
tit = newTit;
You would then have to change your code to use the setters and getters rather than directly accessing the variables.
Mike.

Similar Messages

  • How to override the functionality of a method which is embedded in an swf

    Hi,
    I have an swf for my application for which i do not have the source code. Now i want to override the functionality of a method (say doIt()) in a class (say MyClass.as).
    Is there any way to achieve the classloader functionality that similar to the tomcat classloading functionality for java files.
    i.e Tomcat's classloader searches the WEB-INF/classes directory before the WEB-INF/lib/*.jar. That means my original code is in lib folder, and the orerriden code is in the classes folder. In this case, tomcat will see the classes folder first, if my class does not exist in this folder, then it looks for the lib folder.
    Can we achieve the same class loading functionality in Flex. The overall idea is to change the functionlity of a feature without touching the original swf and by creating an external swf and by calling it.
    Regards,
    Sangeeta Kalyani

    Sangeetha Kalyani,
    Use SWF de-compiler.. and get the source of your SWF.. i think this will simplyfy your JOB...!
    Thanks,
    Pradeep

  • Whats the function used in objective C to change language in an app

    whats the function used in objective C to change language in an app

    No. Actually its a not uncommon practise in iOS. See the app "Where is my Water" for instance. You can freely select what language you want to use in the game.
    Another iOS app where the app does not offer this feature but should is XCom. For me the app uses German text with US-English movies and ingame speech. I would rather have complete english than a language mix, but I cant switch the game. I could swich my ipad to english, then the game would use english. But this would lead to other problems and its not really user friendly.
    Speaking of language support. It is also ok to download languages after installation. After all it is only data, no executable.

  • Upload the data using sessoin method

    HI All,
      i have a flat file of 1000 records i uploaded 1000 records using session method but some records are missing.In error log i got some errors.then now how can i update the error records.

    You haven't provided much information.  What transaction?  What upload method? Custom program or standard?  You either need to process the transactions in foreground or errors only mode to fix them OR you need to fix the errors at the source and re-run them.  A good developer always programs for errors and reprocessing with prevention of duplicates, so that you could run the entire file again without issue.  Did you tag the records/documents with an identifier to prevent duplicates?

  • I want to get the web cam and hide the data using steganography method ?

    i want to do steganography on web cam data, untill now i am able to do the video transmitting using jmf and now i am trying to get the actual video frame data and try to edit that and hide my secrete message. can anyone have any idea how to do this ?? i am a newbie in JMF please help me to get out of this stuff...!!!
    thank you

    http://web.archive.org/web/20080216001605/java.sun.com/products/java-media/jmf/2.1.1/solutions/RotationEffect.html
    For my senior capstone project, we had to hide binary data in a BMP image by encoding the bits into the LSB of the components of the pixel colors. You could do a similar thing with video data.
    The above sample code demonstrates the concept of a custom Effect class... something that modifies a data stream. You can extend it to create two Effect classes, one of which that would write secret data, and one of which that would read the secret data.
    Implementation details of how to get it working are up to you, but you can use the BufferToImage and ImageToBuffer classes to decode and encode the images into buffers.

  • Hi.I want to program a VI to configure Epix's PICXI D2X board and to take images. can anybody help me with any sample programs showing the functions used to configure and communicate with the board.Thanks.

    I am a student. Just started with Labview. hence, any sample VIs will be of real help to start with.

    You might be interested in this post:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=506500000008000000D4700000&ECategory=Vision
    Best of luck.

  • Function to get the path using a parent-child relationship

    Hello,
    I have a table which uses parent-child relationship to store the options available. I need a function to give me the full path given the id of a particular option.
    I have two different functions. One of them uses the Oracle built in function and the other uses simple queries with a loop.The code of the functions are given below.
    Now, the problem is with their "performance". The difference in their performance is significant. The function using the Oracle function takes more than 2 hours to run a query whereas the other function takes less than 2 minutes.
    I am having trouble trusting the other function. No matter how many tests I perform on the output of both the functions, it always comes out to be the same.
    Any thoughts to help me understand this ??
    Function 1
    =====================
    FUNCTION Gettree (opt_id IN NUMBER,i_app_id IN NUMBER)
    RETURN VARCHAR2
    IS
    path VARCHAR2(32767);
    application_no NUMBER;
    BEGIN
    SELECT ABC.APP_OPT_ID INTO application_no FROM ABC
    WHERE ABC.APP_ID = i_app_id AND ABC.PARENT_ID IS NULL;
    SELECT LPAD(' ', 2*LEVEL-1)||SYS_CONNECT_BY_PATH(app_opt_name, '=>') "Path" INTO path
    FROM ABC
    WHERE app_opt_id = opt_id
    START WITH parent_id =application_no
    CONNECT BY PRIOR app_opt_id =parent_id;
    path := SUBSTR(path,INSTR(path,'>')+1,LENGTH(path));
    RETURN path;
    END Gettree ;
    Function 2
    ======================
    FUNCTION GetOptPath(opt_id NUMBER,app_id NUMBER)
    RETURN VARCHAR2
    IS
    string VARCHAR2(900);
    opt VARCHAR2(100);
    pid NUMBER(38);
    BEGIN
    SELECT ABC.parent_id,ABC.app_opt_name INTO pid,string FROM ABC WHERE ABC.app_opt_id = opt_id;
    IF pid IS NULL
    THEN
    RETURN 'root';
    ELSIF pid IS NOT NULL
    THEN
    LOOP
    SELECT ABC.app_opt_name,ABC.parent_id INTO opt, pid FROM ABC WHERE ABC.app_opt_id = pid;
    EXIT WHEN pid IS NULL;
    string := opt || '=>'|| string;
    END LOOP;
    RETURN string;
    END IF;
    END;

    Hi,
    user8653480 wrote:
    Hello Frank,
    The parameters taken by gettree & getoptpath are app_opt_id and app_id and both the functions return only one string i.e. the path of that particular option (app_opt_id) starting from its root and not all the descendants of that option/root node of that option.
    So, does that mean that gettree first fetches all the descendants of the root node of the given option and then returns the required one ??Yes. It's a little like the situation where you need to meet with your co-worker Amy, so you send an e-mail to everyone in the department telling them to come to your office, and then, when they arrive, tell everyone except Amy that they can leave.
    >
    And if that is the case, then won't it be better to use the bottom-up approach to fetch the required path just for that particular option ?? 'coz my requirement is that only.. given an option_id get the full path starting from the root.Exactly!
    I have used explain plan also for both the functions.. but since I did not know how to anlayze the output from plan_table so I just compared the value in the fields and they were exactly the same for both the queries.If you'd like help analyzing the plans, post them, as Centinul said.
    I am attaching a sample data with the outputs of both the functions for the reference.
    (tried attaching the file but could not find the option, so pasting the data here)
    App_opt_ID     App_ID     Parent_ID     App_opt_name     "gettree(app_opt_id,app_id)"     "getoptpath(app_opt_id,app_id)"
    1          1     NULL          application          NULL                    root
    2          1     1          module1               module1                    module1
    3          1     1          module2               module2                    module2
    4          1     2          submod1               module1=>submod1          module1=>submod1
    5          1     3          submod1               module2=>submod1          module2=>submod1
    6          1     5          opt1               module2=>submod1=>opt1          module2=>submod1=>opt1
    7          2     NULL          app2               NULL                    root
    8          2     7          scr1               scr1                    scr1
    9          2     8          opt1               scr1=>opt1               scr1=>opt1
    10          2     7          scr2               scr2                    scr2Please help.The best solution is to do a bottom-up query, and write a function like reverse_path (described in my first message) to manipulate the string returned by SYS_CONNECT_BY_PATH. You seem to have all the PL/SQL skills needed for this.
    Another approach is a revised form of gettree, like I posted earlier. Does it do what you want or not?
    If you'd help, then post a little sample data in a form people can actually use, such as CREATE TABLE and INSERT statements. Post a few sets of parameters, and the results you need from each set, given the sample data posted.

  • Which is the function to execute an .exe file in java

    in languages like c we can create .exe's of files.but in java we cant do that.
    i wanted to implement a software which i compiled in c using java.in c
    i created an .exe of the file and distributed it but in java i dont find any such
    method of creating exe as i would like to distribute the software.please help
    me out on this
    please also give me the name of the function using which i can exexute an
    .exe file

    No problem - it's just that I wanted to alert people to the fact that
    there was another thread. Otherwise It can get very confusing, very
    fast. (The CAPS were unnecessary, sorry about that.)
    Welcome to the forums!

  • Need the functionality of Runtime.getRuntime.freeMemory of 1.4 in 1.2.2

    Hi,
    I need free memory in the JVM. I am aware of that freeMemory() in Runtime returns the value. But this is only in 1.4. I have to use jdk1.2.2. In that freeMemory() will return freeMemory of the system not the JVM. Is there any way to get the freeMemory of the JVM using 1.2.2.
    Poornima

    Runtime.freeMemory() probably goes back to the first version of java. It definitely existed before 1.2.2.
    And as far as I know the functionality of that method has not changed.

  • How can i access the internet using a non-wireless...

    Before upgrading my BT broadband to BT Infinity, I was able to connect my two desktop PC's to the BTHUB2 without a problem. One of them is running Windows 7 and has a wireless connection, the other is running Windows XP and does not have a wireless adapter but it was connected by an ethernet cable to the BTHub2 which was portable and could therefore be plugged into any of the telephone sockets that were positioned around the house.
    Unfortunately, since upgrading to the BTHub3 which is not portable, the Windows XP PC is too far away to connect using an ethernet cable and it is impractical to move it closer to the hub.
    I'm happy with the position of the hub and do not wish to move it, so I need to consider other options.
    As both PC's are in the same room, I understand that it is possible to link them with a Lan cable, and this will enable me to add the XP PC to my home network.
    What I would like to know is what cable I need. (ie. what do I ask for) ? Is it an ethernet crossover cable ?
    I'm sure that other BT Infinity users must have experienced a similar problem with older non-wireless equipment that is not in close proximity to the hub. I would be grateful for any advice that may help me to find the best solution to the problem.          

    Thank you for confirming that a LAN and ethernet connection are the same thing. I have tried linking the two PC's with an ethernet cable and I've read so many articles on how to configure them both to enable the XP computer to connect to the internet via the WIN7 computer and it's wireless connection to the BTHub3, but I'm afraid that I'm now more confused than when I started.
    It should be possible to do so, but unless someone can explain the correct procedure in step-by-step fashion, I don't think that I will ever find the solution using this method.
    Using a power line solution sounds like a simpler solution, but even that raises more questions.
    Just to clarify the problem as I understand it -
    The BT Hub is static and positioned in the hallway.
    Both PC's are in the same upstairs room.
    The room has a telephone socket on an extension which works with a telephone. There are also power sockets available.
    I already have a home network set up with the WIN7 wireless PC as the host.
    I have wireless devices connected to the home network that are working perfectly (eg.  HDTV,Xbox360, Laptop), but can I heck figure out how to connect the WIN XP to the home network.
    I have managed to connect it directly to the Hub using an ethernet cable, but it involved carrying it downstairs into the hall and plugging the ethernet cable directly into the hub, and although this worked a treat, I need the PC to be upstairs.
    Using a long ethernet cable is not an option either I'm afraid. Apart from the untidiness, I believe that it would seriously reduce the speed of the BT Infinity connection, which is also the reason that BT do not recommend plugging the hub into a telephone extension socket.
    So far, using the ethernet cable between the two PC's and using the Networking Connection Wizard on the XP PC, I have tried connecting using the local area network with limited success. The STATUS window shows that it is connected with a speed of 100.0 Mbps, but the ACTIVITY only shows that there are packets being sent, none received. Also, clicking on Internet Explorer brings up a window stating that no connection to the internet is avalable.
    However, my initial optimism that this at least indicated that progress had been made quickly disappeared after adding the   XP machine as a device to my Homegroup on the WIN7 PC.  The  local area connection STATUS window on the WIN7 PC shows the media state as 'enabled' and 'speed 100.0 Mbps', but again it only shows that packets are being sent and none received. Furthermore,  IPv4 connectivity is showing 'no internet access' and IPv6 connectivity shows 'no network access'.
    I've tried running Windows Network Diagnostics and the troubleshooter stated that the Local Area Connection does not have a valid IP configuration. Here is the troubleshooting report:
    Issues found:
    "Local Area Connection" doesn't have a valid IP configuration  NOT FIXED
    Reset the "Local Area Adapter"                                             Completed
    Investigate router or broadband modem issues                      Completed
    Details about network adapter diagnosis:
    Network adapter Local Area Connection driver information:
    Description............................ Intel (R) 82562v-2 10/100 Network Connection
    Manufacturer......................... Intel
    Provider................................ Microsoft
    Version................................. 9.13.4.10
    Inf File Name........................ C:\Windows\INF\netele32.inf
    Inf File Date.......................... Monday,  July 13, 2009   8:46:31 PM
    Section Name........................ E104C
    Hardware ID......................... pci\ven_8086&dev_10c0
    Instance Status Flags............. 0x180200a
    Device Manager Status Code.. 0
    IfType.................................. 6
    Physical Media Type.............. 0  
    The Internet Protocol (TCP/IP) Properties on both PC's for the Local Area Connection were input as follows:
    IP address: 192.168.1.68 (with 68 being the next device number available)
    Subnet mask: 255.255.255.0
    Default Gateway: 192.168.1.254
    Preferred DNS server: 192.168.1.254
    Alternate DNS server: . . . .
    I've also tried configuring the above properties by ticking the box 'Automatically detect settings', but it reports no connectivity. I haven't tried the third available configuration option which is 'using a proxy server', because I don't know if it is relevant or not and it is asking me to input an 'address' and 'port' ?
    Any solution ideas would be greatly appreciated.

  • Open URL, use POST method in new window

    From a Java program, how do we open a https connection, basically a secured site, in a new window and pass some parameters to the link, using POST method?

    Hi
    Is JavaProgram a Applet or Servlet?
    Opening a new window directly from server,probably not possible? From your question
    what I understand is, A html page is displayed
    and when u click on a link opens a new window.
    The parameters to the link should be posted using POST method, again
    it is not possible this can be done only by appending
    "?name1=value1&name2=value2..."to the link
    Vinay
    [email protected]

  • Why can't I call the function in the swf from the javascript?

    Hello,
    I have an html file that calls the function in swf file. In the swf file, I registered the function to be called using ExternalInterface.addCallback, as the book says.
    And I put this swf file in the html file using <object> tag and attempted to call the function using this object's id attribute.
    But every time to run this file, what I see is the error message such as "test1.show is not a function".
    Why is it?
    Please anyone help me. I am enclosing my work file. It's very simple one.
    Thank you.
    Daniel.

    It is entirely possible your college has decided to block certain websites. It's easy to do.

  • Need more info abt the functions of each classes in Workflow API's of BPEL

    Need more information about the functions of each method of the classes in Workflow API's of BPEL
    The Java documentation of the workflow API (especially Identity Service classes) is having a one liner explanation for the methods of each class. We need to implement our own Identity Service that implements the BPMIdentityService interface. We are not able to map the function of each methods of this interface to what our security subsystem provides. We feel that we need more detailed information about what each method of each class is doing internally so that we can map to whatever our security subsystem provides.
    The BPEL Developers Guide does not talk about the functionality of each methods of this interface. If anybody can guide me to look into some documentation that has this information or if anybody has this information, then please do the necessary help.
    Regards
    Ramana

    Did you find out the solution for your above posted query ? I'm also in need of some documents. Can you help me out?

  • I don't  know how to use these methods. actionPerformed, additem, and remov

    cand any one help me to implement these actions.
    I want to be able to select item from the the list to the textarea by using the addit button.
    import java.awt.*;
    import java.applet.Applet;
    import java.awt.event.*;
    public class Shopping extends Applet implements ActionListener, ItemListener
         private TextArea buy;
         private List foodList;
         private Button purches, remove;
         ItemList myitems;
         public void init(){          
              myitems = new ItemList();
              foodList = new List();
              foodList.add("Rice");
              foodList.add("Corn");
              foodList.add("Beans");
              foodList.add("Wheat");
              foodList.add("Banana");
              foodList.add("Bread");
              foodList.add("Meat");
              foodList.add("Fish");
              foodList.add("Nuts");
              foodList.add("Apple");
              foodList.add("may");
              foodList.add("salt");
              foodList.add("season");
              foodList.add("Beef");
              add(foodList);
              foodList.addItemListener(this);
              purches = new Button("Add IT");          
              add(purches);
              purches.addActionListener(this);
              remove = new Button("I don't want");
              add(remove);          
              remove.addActionListener(this);
              buy = new TextArea(10, 20);          
              add(buy);          
         public void itemStateChanged(ItemEvent e){
              if(e.getSource()==foodList){
                   String foodChoice = e.getItem().toString();
         public void actionPerformed(ActionEvent e){
              if(e.getSource()==purches);
              //myitems.addItem(items);
    class ItemList{
    String[] myList;
    private int count;
    public ItemList(){
    myList =new String[9];
    count=0;
    public int countList(){
    return count;
    public void addItem(String items){
    while(count < myList.length){
    myList[count++]=items;
    public void removeItem(String items){
    while(myList[count]!=null){
    if(myList[count].equals(items)){
    String discard = myList[--count];

    First of all the list does not produce any action event for a
    single click. It produces an action event for the double click.
    So you must use a choice list.
    for the list, the function used is actionPerformed(ActionEvent
    e)
    for the choice list , the function used is
    itemStateChanged(ItemEvent e)
    you must use a "\n" in the string to bring the item to the next
    line in the textarea.
    I am giving the full program below.
    import java.awt.*;
    import java.applet.Applet;
    import java.awt.event.*;
    public class Shopping extends Applet implements ActionListener, ItemListener
    //my code here.
    String items=" ";
    //my code ends here.
    private TextArea buy;
    private Choice foodList;
    private Button purches, remove;
    ItemList myitems;
    public void init(){
    myitems = new ItemList();
    foodList = new Choice();
    foodList.add("Rice");
    foodList.add("Corn");
    foodList.add("Beans");
    foodList.add("Wheat");
    foodList.add("Banana");
    foodList.add("Bread");
    foodList.add("Meat");
    foodList.add("Fish");
    foodList.add("Nuts");
    foodList.add("Apple");
    foodList.add("may");
    foodList.add("salt");
    foodList.add("season");
    foodList.add("Beef");
    add(foodList);
    foodList.addItemListener(this);
    purches = new Button("Add IT");
    add(purches);
    purches.addActionListener(this);
    //my code
    //foodList.addActionListener(this);
    remove = new Button("I don't want");
    add(remove);
    remove.addActionListener(this);
    buy = new TextArea(10, 10);
    add(buy);
    public void itemStateChanged(ItemEvent e){
    //my code here.
         String s = ((Choice)e.getItemSelectable()).getSelectedItem();
         System.out.println(s);
         items=items+s+"\n"; //the \n is given so that the next item comes in the next line.
         buy.setText(items);
    //my code ends here.
    public void actionPerformed(ActionEvent e){
    //if(e.getSource()==purches);
    //myitems.addItem(items);
    String s=((List )e.getSource()).getSelectedItem();
    System.out.println(s);
    class ItemList{
    String[] myList;
    private int count;
    public ItemList(){
    myList =new String[9];
    count=0;
    public int countList(){
    return count;
    public void addItem(String items){
    while(count < myList.length){
    myList[count++]=items;
    public void removeItem(String items){
    while(myList[count]!=null){
    if(myList[count].equals(items)){
    String discard = myList[--count];

  • Functionality used in Folders structures

    We are having requirment in our project to implement the functionality used in GMAIL \Email folders.
    All the related mails from the particular person are merged together as (+) and if we want to open all the contents within that we bee shown as (-).this is the functionality used for Email Folders also.
    can i have the sample code to implement the same.

    Hi,
    Read the tutorial on how to use JTree.
    http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html
    /Kaj

Maybe you are looking for