Try to create a method to return an object as xml

I'm trying to create a method for an object to return the objects attributes in xml format.
here is what I have done so far:
-- create the object hierachy
create or replace type ras4.atomic_tp as object
     (atomic_instance_id     varchar2(8),
     service_instance_id     varchar2(8),
     parent_atomic_instance_id varchar2(8),
     MEMBER FUNCTION return_xml RETURN varchar2)
NOT INSTANTIABLE
NOT FINAL;
create or replace type ras4.parm_const_tp under ras4.atomic_tp
     (parameter_name          varchar2(75))
NOT INSTANTIABLE
NOT FINAL;
create or replace type ras4.contact_tp under ras4.atomic_tp
     (address_line_1          varchar2(80),
     address_line_2          varchar2(80),
     address_line_3          varchar2(80),
     city               varchar2(20),
     state               varchar2(2),
     country               varchar2(20),
     postal_code          varchar2(20),
     voice_telephone          varchar2(20),
     dns_telephone          varchar2(20),
     fax               varchar2(20),
     email               varchar2(80),
     url               varchar2(20),
     contact_inst          varchar2(255))
NOT INSTANTIABLE
NOT FINAL;
create or replace type PERSON_tp under contact_tp
     (prefix               varchar2(7),
     first_name          varchar2(50),
     middle_name          varchar2(50),
     last_name          varchar2(50),
     suffix               varchar2(20),
     nick_name          varchar2(50),
OVERRIDING MEMBER FUNCTION return_xml return varchar2)
INSTANTIABLE
FINAL;
create table ras4.person_tb of ras4.person_tp;
insert into ras4.person_tb values
(ras4.person_tp('00001', '00001', '00001', '1111 Trail Lake Dr.', null, null, 'Fort Worth',
'TX', 'USA', '76233', '(817)346-0004', null, null, '[email protected]', 'www.tom.com', 'no calls after 10:00 please',
'Mr.', 'Tom', 'Scott', 'Tiegen', null, 'Tom'));
commit;
-- now different things I have tried to get the member function to work:
CREATE or replace TYPE BODY RAS4.PERSON_TP AS
     overriding MEMBER FUNCTION RETURN_XML RETURN VARCHAR2 IS
qryCtx DBMS_XMLGEN.CTXHANDLE;
result CLOB;
BEGIN
     qryCtx :=
     DBMS_XMLGEN.NEWCONTEXT ('select self.first_name from dual;');
result := DBMS_XMLGEN.GETXML(qryCtx);
          RETURN (RESULT);
     END;
END;
I try to invoke the method as below:
DECLARE
v_person ras4.person_tp;
v_person_ref ref ras4.person_tp;
V_string varchar2(2000);
BEGIN
select value(a)
into v_person
from ras4.person_tb a
where a.atomic_instance_id = '00001';
v_string := v_person.return_xml;
DBMS_OUTPUT.PUT_LINE(v_string);
END;
I get the following error:
DECLARE
ERROR at line 1:
ORA-19206: Invalid value for query or REF CURSOR parameter
ORA-06512: at "SYS.DBMS_XMLGEN", line 83
ORA-06512: at "RAS4.PERSON_TP", line 7
ORA-06512: at line 12
-- I try to use
from the command line I type in this:
select sys_xmlgen(value(p))
from person_tb p
where p.atomic_Instance_id = '00001';
and it seems to work.
trying to put this into a member function - I try this:
CREATE or replace TYPE BODY RAS4.PERSON_TP AS
     overriding MEMBER FUNCTION RETURN_XML RETURN VARCHAR2 IS
v_string varchar2(200);
v_person ras4.person_tp;
BEGIN
     v_person := self;
     select v_person.first_name into v_string from dual;
     return (select sys_xmlgen(value(v_person)));
     END;
END;
This fails to compile.
any help is greatly appreciated.
tom

PN,
First, it's impossible to create static method with WD IDE designers for controllers.
Next, if you simply need to call method from wdDoModifyView, just create instance method createHTMLViewer in regular way then call it from wdDoModifyView via wdThis.createHTMLViewer().
Third, you may create this method manually directly in source code, just place it at the end of controller between comments //@begin other ... //@end.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com

Similar Messages

  • Calling a method that returns an object Array

    Hello.
    During a JNICALL , I wish to call a method which returns an object array.
    ie my java class has a method of the form
    public MyObject[] getSomeObjects(String aString){
    MyObject[] theObjects=new MyObject[10];
    return theObjects
    Is there an equivalent to (env)->CallObjectMethod(...
    which returns a jobjectArray instead of a jobject, and if not could somebody suggest a way around this.
    Thanks,
    Neil

    I believe an array oj jobjects is also a jobject. You can then cast it to another class.

  • Creating a function and return something from an XML file

    Hi!
    I'm working with timeline actionscript. I want to create a function that loads my xmlfile and returns an xmlobject with the file's content.
    This is what I got so far:
    my_btn.addEventListener(MouseEvent.CLICK, getXML("myxml.xml")); //1067: Implicit coercion of a value of type void to an unrelated type Function.
    function getXML(fn:String):void{
         var infoLoader:URLLoader = new URLLoader();
         infoLoader.addEventListener(Event.COMPLETE, xmlLoaded);
         infoLoader.load(new URLRequest(fn));
         var myXML:XML = xmlLoaded(); //1136: Incorrect number of arguments.  Expected 1.
         trace(myXML);
    function xmlLoaded(e:Event):XML{
         return e.target.data;
         //trace(e.target.data);
    Can anyone take a look and perhaps point me in the right direction?
    Thanks

    I have never used a listcomponent, so I can only help with the steps before filling it with data.
    I think you should at start of your application load the XML with filenames and just after it's completed, e.g. in Event.COMPLETE handler, load all other XMLs looping through filenamesXML, like this
    var filenamesXML:XML;
    var XMLsToLoad:uint = 0;
    function filenamesXMLLoaded(e:Event):void
         filenamesXML = XML(e.target.data);
         XMLsToLoad =  filenamesXML.filenames.children().length();
         for (var i:uint =1; i < filenamesXML.filenames.children().length(); i++)
                  getXML( filenamesXML.filenames.children()[i] ); // the function from my previous post, don't forget to implement it
    //modify the minor xml load handler from the previous post
    function xmlLoaded(e:Event):void
         var loadedXML:XML = XML(e.target.data);   
         xmlArray.push(loadedXML);
         XMLsToLoad--;
    //assign the one click handler to all buttons, a loop here would be quite handy
    function clickHandler(e:MouseEvent):void
         if (XMLsToLoad == 0) //check if all xmls have been completely loaded
              switch (e.target.name) // swith by clicked button's instance name
                   case "button_1":
                        // here you have to implement supplying listcomponent with data, I think a loop again will be a good idea
                        break;
                   case "button_2":
                        // ibid.
                        break;
    Regards,
    gc

  • Create interface method in standard component.

    Hi Experts,i want to enhance standard component.in that i created one attribute and i used in my component.For that attribute the value is passing from some other component.i try to create interface method in standard component.but it is not possible.so please help me out this issue.
    Regards
    prasad

    Hi,
    No, You cannot create Interface Methods/Nodes in Standard Component by Enhancing. I would suggest to create a Singleton class and create your method in that class and can access across components.
    Regards,
    Kiran

  • When a Method Returns an Object, does it return a copy or a pointer?

    When you have a method that returns an Object, is the Object returning a copy of the Object returned inside
    of the Method or is it an Actual pointer to the Object inside of the method's coresponding Object?
    so say you have an object ...
    Class Something {
    JLabel myLabel = new JLable("myLabel");
    public JLabel getLabel() {
    return myLabel;;
    Something something = new Something();
    JLable theLabel = something.getLabel()
    theLable.setString("theLable");
    so when I setString on the Object theLabel , am I going to change the value of myLabel inside of the Object something?

    Yes, it returns a pointer.

  • ServerMBean start and kill methods return unserializable objects

    The ServerMBean start and kill methods both return unserializable
    objects which makes them unusable from a JVM other than that on which
    the server runs.
    This is unfortunate, as one would expect these things to be fairly
    standard tasks for a JMX client.
    I noticed in 7.0 they have been deprecated along with stop() - is
    there a known workaround for the time being?
    Thanks,
    Andrew Rosenfeld.

    I can't really answer you final question yet, but I will add what I know at this time, and look into it later next week.
    The JNLPClassLoader extends SecureClassLoader, so as the doc you refer to implys (in it's chapter on SecureClassLoader), the PermissionCollection it grants to code is statically bound at the time a class's defineClass() is called. The JNLPClassLoader's getPermissions() method starts with super.getPermissions, so the current policy permissions are added to those granted by the jnlp client, but it is still unmodifyable after that.
    For local intrenet applications several configuration options have been added in 1.5.0 (J2SE 5.0) that may help.
    You can implement an enterprise wide system configuration that includes system or user level policy files.
    You can also configure pre-accepted certificates so all code signed by your company can be trusted without the users seeing a security warning dialog.
    /Dietz

  • Generic approach to call a method for any business object

    My requirement is to call the DISPLAY method of a business object when I have the objectType and objectId.
    Say I have BUS2012 and Id 4500001111, now I want to call a method which invoke the DISPLAY method for this object with objectId (say ME_DISPLAY_PURCHASE_DOCUMENT for purchase order). I even have the key fields for the business object.
    Is it possible ?
    Thanks in advance !
    Ruhi Hira

    Hi Ruhi,
               Yes you can call the method for display.Before we can do that we need to fix the procedure for the calling of the method.If you want to call it programitically or you want to call it in task builder or you want to use it as a activity in the work item.we can check for the BUSXXXXXX what ever number is there and we can also check for the activity type pre defined by SAP for it.If suppose you dont have the activity we can create the method for the BOR object type using SWO1.May be it helps your query.
    Have a best day ahead.

  • I get an "install failed" message. "Recovery system can't be created-click restart to return to previous version of OS X." This doesn't work. My Mac continues to try to install Mountain Lion. What is the elegant way to get my system back?

    I get an "install failed" message. "Recovery system can't be created—click restart to return to previous version of OS X." This doesn't work. My Mac continues to try to install Mountain Lion. What is the elegant way to get my system back?

    The first time I attempted to install ML was on a late 2011 MBP.  It ran for three minutes then gave me the error message: Could not install OSX due to an unexpected error.  I was using the original ML install app, not a USB or other drive.  
    After a couple of restarts wiht the same result I saw a message to the effect that the install was trying to close open apps.  I closed apps  manually a few times to no avail.  I shut down instead of restarting then booted into Safe mode (hold down the shift key when starting) and that did it.  The install went smoothly after that. 
    I since installed ML in two iMacs using a cloned copy of the install app on a USB drive.  This time I shut down the computers and booted into Safe Mode first and there were no problems. 
    I don't know if this issue is the one causing you these problems but it is a simple enough solution to try.
    Jay

  • HT2534 i have a half-filled form for my apple id account & in it there is no option as NONE for credit card payment method. Now when i try to create a new account it asks me for a different email/apple id as my actual id already exists???

    i have a half-filled form for my apple id account & in it there is no option as NONE for credit card payment method. Now when i try to create a new account it asks me for a different email/apple id as my actual id already exists???

    If you want to use the email address that you used on the first account then you will need to remove it from that first account before you can do so e.g. via the Store > View Account menu option on your computer's or via http://appleid.apple.com - you can create a new email address via http://gmail.com or http://hotmail.com to replace it with.

  • Entity created by method create_related_entity losing attribute referenz

    Hi all,
    I created a new Z-relation between the IS-U connection object an an own object (inherited from CL_CRM_GENIL_ABSTR_SO_HANDLER2) to handle customer specific data. It works fine except for one point. Existing data are handled well, I can modify and delete them. But if I add a new dataset with the method create_related_entity (in a event handler EH_ONNEW) to the connection object, there is a problem.
    The created entity seems to be ok, the attribute reference is filled and in the collection wrapper of the connection object, I could find the new entity as related. But in the getter-methods of the context node in view the attribute reference of the entity is initial (not bound). It is the same instance of entity class, but I don't know why and where the attribute reference is lost. In consequence, I'm able to create and save an initial entity (that I could modify in another session smoothly), but I'm unable to modify its values in the session in which it was created.
    Can anyone help me?
    Regards,
    Martin

    Hi Lisha,
    All you need to do it make sure that the parent entity is locked before creating the child entities through create_related_entity method.
    You can take a look at EH_ONCREATE method in BT111H_OPPT/ContactsOV  view of component BT111H_OPPT.
    (Alternatively just do a where-used list of the create_related_entity method and you will find many instances of the method in standard code in your system. Typically, it would be called in the event handlers for INSERT/CREATE or in the on_new_focus methods).
    * Lock the parent entity
      IF lr_entity->is_locked( ) = abap_false.
        IF lr_entity->lock( ) = abap_false.
          RETURN.
        ENDIF.
      ENDIF.
    * If lock is successful
      IF lr_entity->is_changeable( ) = abap_true.
            TRY.
    *           Create the related entity
                lr_entity = lr_entity->create_related_entity( iv_relation_name = 'BTPartnerBuyingCenter' ).
              CATCH cx_crm_genil_model_error cx_crm_genil_duplicate_rel.
            ENDTRY.
    ENDIF.
    Regards
    Nisha

  • I'm doing something wrong when I try to create a file.

    I'm working with binary files, trying to do a log file and I'm having this error
    java.io.FileNotFoundException: log.dat (No such file or directory)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at Servidor.XServer.log(XServer.java:186)
         at Servidor.XServer$nwc$readLine.run(XServer.java:312)This is because the file is not being created, but I don't know why, here is my code, where I try to create it.
         /// ANADIR EVENTOS AL ARCHIVO LOG // ADD EVENTS TO LOG FILE
         int log(String arg[], String ip , String voto){
              File file = null;
             if (file == null) {
                 System.out.println ("Default: log.dat");       
                 file = new File ("log.dat");     //    why it isn't creating the file?
             // Now write the data to the file.
             try{
                  FileInputStream file_input = new FileInputStream (file);
                 DataInputStream data_in    = new DataInputStream (file_input);
                 String iptmp ="";  // ip tmp
                 String vot1=null;          // vot 1er lugar tmp
                 String vot2=null;        // vot 2do lugar
                 int itmp=0;          // intentos tmp
                 while(true){
                    try{
                      iptmp= data_in.readUTF();
                      vot1= data_in.readUTF();
                      vot2=data_in.readUTF();
                      itmp=data_in.readInt();
                 DataOutputStream data_out = new DataOutputStream (new FileOutputStream (file));
                 voto=(voto.substring(0, 1)+chart.get(Integer.parseInt(voto.substring(1, voto.length()))));
                           // SI EL IP YA VOTO POR EL PRIMER EQUIPO (ERROR EN VOTO)
                        if (iptmp.equalsIgnoreCase(ip) && vot1!=null && voto.startsWith("1")){
                             data_out.writeInt(itmp+1);
                             return(-1);
                        // SI EL IP YA VOTO POR EL SEGUNDO EQUIPO (ERROR EN VOTO)
                        if (iptmp.equalsIgnoreCase(ip) && vot2!=null && voto.startsWith("2")){
                             data_out.writeInt(itmp+1);
                             return(-1);
                        // SI UN IP NO HA VOTADO POR EL PRIMER LUGAR     
                      if (iptmp.equalsIgnoreCase(ip) && vot1==null && voto.startsWith("1")){
                         data_out.writeChars(ip);  // ip
                         data_out.writeChars(voto);   // voto por primer lugar
                         data_out.writeInt(itmp); // intentos de votos
                         // SI UN IP NO HA VOTADO POR EL SEGUNDO LUGAR
                      if(iptmp.equalsIgnoreCase(ip) && vot2==null && voto.startsWith("2")){     
                         data_out.writeChars(ip);  // ip
                         data_out.writeChars(voto);   // voto por segundo lugar
                         data_out.writeInt(itmp); // intentos de votos
                      data_out.close();
                 }catch (EOFException eof) {
                             System.out.println ("End of File");
                             break;
                      data_in.close();
             } catch (IOException e) {
                   e.printStackTrace();
              return 0;
         }Would you help me out with this? I don't see what is wrong I'm following an example from the oracle / java tutorial and I cant see what is different

    I´m not sure if Im understanding what you´re saying... If you dont describe the path, then the file will be created in the project folder, right?
    check this program out
    it doesnt specifies a path but if you try run it the file will be created in the project folder. ¨
    import java.io.*;
    import java.util.*;
    /**  Write a primitive type data array to a binary file.**/
    public class BinOutputFileApp
      public static void main (String arg[]) {
        Random ran = new Random ();
        // Create an integer array and a double array.
        int    [] i_data = new int[15];
        double [] d_data = new double[15];
        // and fill them
        for  (int i=0; i < i_data.length; i++) {
          i_data[i] = i;
          d_data[i] = ran.nextDouble () * 10.0;
        File file = null;
        // Get the output file name from the argument line.
        if (arg.length > 0) file = new File (arg[0]);
        // or use a default file name
        if (file == null) {
            System.out.println ("Default: numerical.dat");
            file = new File ("numerical.dat");
        // Now write the data array to the file.
        try {
          // Create an output stream to the file.
          FileOutputStream file_output = new FileOutputStream (file);
          // Wrap the FileOutputStream with a DataOutputStream
          DataOutputStream data_out = new DataOutputStream (file_output);
          // Write the data to the file in an integer/double pair
          for (int i=0; i < i_data.length; i++) {
              data_out.writeInt (i_data);
    data_out.writeDouble (d_data[i]);
    // Close file when finished with it..
    file_output.close ();
    catch (IOException e) {
    System.out.println ("IO exception = " + e );
    } // main
    } // class BinOutputFileApp

  • Web Service Method that returns an ArrayList

    Hi guys,
    I have to create a web service method that returns an ArrayList, but it's not working. My problem is:
    With the "@XmlSeeAlso" annotation, my client prints the result, but the ArryaList is not from java.util, it's from org.me.calculator so I can't use it.
    If I remove this annotation, I get no result, with this error message on Tomcat 6:
    [javax.xml.bind.JAXBException: class java.util.ArrayList nor any of its super class is known to this context.]
    I'm a newbie, and trying to understand web services (I read some posts here, but didn't get the point, from its answers), but this problem I just can't figure out how to solve....
    WEb Service
    package org.me.calculator;
    import java.io.Serializable;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import java.util.*;
    import java.util.ArrayList;
    import javax.xml.bind.annotation.XmlSeeAlso;
    * @author eduardo.domanski
    @WebService()
    @XmlSeeAlso({java.util.ArrayList.class}) // With this, I can see the result on client, but, the ArrayList is an org.me.calculator.ArrayList class.... Strange...
    public class CalculatorWS {
        @WebMethod(operationName = "valores")
        public ArrayList valores(@WebParam(name = "a") int a,
                           @WebParam(name = "b") int b) {
            ArrayList teste = new ArrayList();
            ArrayList a1 = new ArrayList();
            a1.add(a);
            a1.add(b);
            ArrayList a2 = new ArrayList();
            a2.add(a+b);
            a2.add(a-b);
            teste.add(a1);
            teste.add(a2);
            return  teste; 
    }CLient
    package org.me.calculator.client;
    import java.io.*;
    import java.net.*;
    import java.util.ArrayList;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ClientServlet extends HttpServlet {
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet ClientServlet</title>");
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet ClientServlet at " + request.getContextPath() + "</h1>");
            try { // Call Web Service Operation
                org.me.calculator.CalculatorWSService service = new org.me.calculator.CalculatorWSService();
                org.me.calculator.CalculatorWS port = service.getCalculatorWSPort();
                // TODO initialize WS operation arguments here
                int i = 8;
                int j = -6;
                // TODO process result here
                ArrayList result = (ArrayList) port.valores(i, j);
                out.println("Result = " + result);
            } catch (Exception ex) {
                System.out.println(ex);
            // TODO handle custom exceptions here
            out.println("</body>");
            out.println("</html>");
            out.close();
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            processRequest(request, response);
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            processRequest(request, response);
    }THank you all,
    Eduardo
    Edited by: EduardoDomanski on Apr 23, 2008 4:40 AM

    I forgot to say that, when I try to return an ArrayList of an object, for example, ClassA, which is on the package org.me.classes, on my Server App, the ArrayList is returned, but the objects are from type org.me.calculator.ClassA. It should be from org.me.classes.ClassA, right?
    This package also exists on my client App, to use the object, but as the returned type is from another package, I can't even cast it. I tried some annotations @Xml... but it failed.
    Packages
    ServerApp
    org.me.calculator
    CalcWS.java
    org.me.classes
    ClassA.java
    Client App
    org.me.classes
    ClassA.java
    The return from my method should be an ArrayList of org.me.classes.ClassA, but when I print it, on client, it's from org.me.calculator.ClassA.
    Does anybody knows, or had the same problem?
    Thanks,
    Eduardo

  • An internal error has ocurred when I try to create new DC

    Hi everyone,
    When I try to create a new Web Dynpro DC, its will return "An internal error has occurred.See error log for more details". No matter whatever name I give still same.
    Message: Resource /JDI.....com alredy exists.
    Exception: org.eclipse.core.internal.resource.ResourceException: Resource /JDI.....com already exists.
    p/s: I have checked in DTR and the DC are not exists.
    Kindly please help.
    Thanks.

    Dear Pandya,
    Here some error that I get:
    Kind        Description     Resource     Location
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid return type) for the method createModelClassFactory     Abort.java     line 31
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid return type) for the method createModelClassFactory     Discard.java     line 31
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid return type) for the method createModelClassFactory     GetTransfers.java     line 31
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid return type) for the method createModelClassFactory     Request_Abort.java     line 31
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid return type) for the method createModelClassFactory     Request_Discard.java     line 31
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid return type) for the method createModelClassFactory     Request_GetTransfers.java     line 31
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid return type) for the method createModelClassFactory     Request_Restart.java     line 31
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid return type) for the method createModelClassFactory     Response_Start.java     line 31
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid return type) for the method createModelClassFactory     Start.java     line 31
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid type) for the field TransferViewer3.TYPED_MODEL_INFO     TransferViewer3.java     line 30
    Error     com.sap.tc.webdynpro.model cannot be resolved (or is not a valid type) for the field VendorAdmWsModel.TYPED_MODEL_INFO     VendorAdmWsModel.java     line 30
    Error     com.sap.tc.webdynpro.model cannot be resolved or is not a type     Abort.java     line 32
    Error     com.sap.tc.webdynpro.model cannot be resolved or is not a type     Restart.java     line 32
    Error     com.sap.tc.webdynpro.model cannot be resolved or is not a valid superclass     Abort.java     line 14
    Error     com.sap.tc.webdynpro.model cannot be resolved or is not a valid superclass     AbortResponse.java     line 14
    Error     com.sap.tc.webdynpro.model cannot be resolved or is not a valid superclass     Discard.java     line 14
    Error     com.sap.tc.webdynpro.model cannot be resolved or is not a valid superclass     GetTransfersResponse.java     line 14
    Error     com.sap.tc.webdynpro.model cannot be resolved or is not a valid superclass     DeleteVendor.java     line 14
    Error     com.sap.tc.webdynpro.model cannot be resolved or is not a valid superclass     DeleteVendorResponse.java     line 14
         Error     com.sap.tc.webdynpro.model cannot be resolved or is not a valid superclass     Request_CreateVendor.java     line 14
    Error     com.sap.tc.webdynpro.model cannot be resolved or is not a valid superclass     Request_DeleteVendor.java     line 14
    Error     javax.xml.namespace cannot be resolved (or is not a valid type) for the field TransferViewer3.interfaceQName     TransferViewer3.java     line 23
    Error     javax.xml.namespace cannot be resolved (or is not a valid type) for the field VendorAdmWsModel.interfaceQName     VendorAdmWsModel.java     line 23
    Error     The constructor Object(VendorAdmWsModel, ICMIModelClass) is undefined     Request_CreateVendor.java     line 25
    Error     The constructor Object(VendorAdmWsModel, ICMIModelClass) is undefined     Response_UpdateVendor.java     line 25
    Error     The constructor Object(VendorAdmWsModel, ICMIModelClass) is undefined     UpdateVendor.java     line 25
    Error     The constructor Object(VendorAdmWsModel, ICMIModelClass) is undefined     UpdateVendorResponse.java     line 25
    Error     The method associatedModel() is undefined for the type DeleteVendor     DeleteVendor.java     line 21
    Error     The method associatedModel() is undefined for the type DeleteVendorResponse     DeleteVendorResponse.java     line 21
    Error     The method associatedModel() is undefined for the type Request_DeleteVendor     Request_DeleteVendor.java     line 21
    Error     The method associatedModel() is undefined for the type Request_Discard     Request_Discard.java     line 21
    Error     The method associatedModel() is undefined for the type Request_GetTransfers     Request_GetTransfers.java     line 21
    Error     The method associatedModel() is undefined for the type Request_GetVendors     Request_GetVendors.java     line 21
    Error     The method associatedModel() is undefined for the type Request_Restart     Request_Restart.java     line 21
    Error     The method associatedModel() is undefined for the type Request_Start     Request_Start.java     line 21
    Error     The method associatedModel() is undefined for the type Request_UpdateVendor     Request_UpdateVendor.java     line 21
    Error     The method associatedModel() is undefined for the type Response_Abort     Response_Abort.java     line 21
    Error     The method associatedModel() is undefined for the type Response_CreateVendor     Response_CreateVendor.java     line 21
    Error     The method associatedModel() is undefined for the type Response_DeleteVendor     Response_DeleteVendor.java     line 21
    Error     The method associatedModel() is undefined for the type Response_Discard     Response_Discard.java     line 21
    Error     The method associatedModel() is undefined for the type Response_GetTransfers     Response_GetTransfers.java     line 21
    Error     The method associatedModel() is undefined for the type Response_GetVendors     Response_GetVendors.java     line 21
    Error     The method createModelClassFactory() is undefined for the type Response_CreateVendor     VendorAdmWsModel.java     line 64
    Error     The method createModelClassFactory() is undefined for the type Response_DeleteVendor     VendorAdmWsModel.java     line 62
    Error     The method createModelClassFactory() is undefined for the type Response_Discard     TransferViewer.java     line 58
    Error     The method createModelClassFactory() is undefined for the type Response_GetTransfers     TransferViewer.java     line 52
    Error     The method createModelClassFactory() is undefined for the type Response_GetVendors     VendorAdmWsModel.java     line 61
    Error     The method createModelClassFactory() is undefined for the type Start     TransferViewer3.java     line 40
    Error     The method createModelClassFactory() is undefined for the type StartResponse     TransferViewer3.java     line 38
    Error     The method createModelClassFactory() is undefined for the type TaskInfo     TransferViewer.java     line 53
    Error     The method createModelClassFactory() is undefined for the type UpdateVendor     VendorAdmWsModel.java     line 59
    Error     The method createModelClassFactory() is undefined for the type UpdateVendorResponse     VendorAdmWsModel.java     line 65
    Error     The method createTypedModelInfo() is undefined for the type TransferViewer     TransferViewer.java     line 30
    Error     The method createTypedModelInfo() is undefined for the type TransferViewer3     TransferViewer3.java     line 30
    Error     The method createTypedModelInfo() is undefined for the type VendorAdmWsModel     VendorAdmWsModel.java     line 30
    Error     The method execute() is undefined for the type Request_Abort     TransferViewer.java     line 371
    Error     The method getAttributeValueAsBoolean(String) is undefined for the type Object     DestinationInfo.java     line 112
    Error     The method getAttributeValueAsBoolean(String) is undefined for the type Object     DestinationInfo.java     line 242
    Error     The method getRelatedModelObject(String) is undefined for the type Request_Abort     Request_Abort.java     line 60
    Error     The method getRelatedModelObject(String) is undefined for the type Request_CreateVendor     Request_CreateVendor.java     line 46
    Error     The method getRelatedModelObject(String) is undefined for the type Request_CreateVendor     Request_CreateVendor.java     line 60
    Error     The method getRelatedModelObject(String) is undefined for the type Request_DeleteVendor     Request_DeleteVendor.java     line 46
    for the type Request_GetVendors     Request_GetVendors.java     line 60
    Error     The method getRelatedModelObject(String) is undefined for the type Request_Restart     Request_Restart.java     line 46
    Error     The method getRelatedModelObject(String) is undefined for the type Request_Restart     Request_Restart.java     line 60
    Error     The method getRelatedModelObject(String) is undefined for the type Request_Start     Request_Start.java     line 46
    Error     The method getRelatedModelObject(String) is undefined for the type Request_Start     Request_Start.java     line 60
    Error     The method getRelatedModelObject(String) is undefined for the type Request_UpdateVendor     Request_UpdateVendor.java     line 46
    Error     The method getRelatedModelObject(String) is undefined for the type Response_Start     Response_Start.java     line 46
    Error     The method getRelatedModelObject(String) is undefined for the type Response_UpdateVendor     Response_UpdateVendor.java     line 46
    Error     The method getRelatedModelObject(String) is undefined for the type UpdateVendor     UpdateVendor.java     line 46
    Error     The method getRelatedModelObjects(String) is undefined for the type GetTransfersResponse     GetTransfersResponse.java     line 46
    Error     The method getRelatedModelObjects(String) is undefined for the type GetVendorsResponse     GetVendorsResponse.java     line 46
    Error     The method removeRelatedModelObject(String, DestinationInfo) is undefined for the type GetVendorsResponse     GetVendorsResponse.java     line 66
    Error     The method removeRelatedModelObject(String, TaskInfo) is undefined for the type GetTransfersResponse     GetTransfersResponse.java     line 66
    Error     The method setAttributeValue(String, String) is undefined for the type Object     Abort.java     line 52
    Error     The method setAttributeValueAsBoolean(String, boolean) is undefined for the type Object     DestinationInfo.java     line 117
    Error     The method setAttributeValueAsBoolean(String, boolean) is undefined for the type Object     DestinationInfo.java     line 247
    Error     The method setRelatedModelObject(String, AbortResponse) is undefined for the type Response_Abort     Response_Abort.java     line 52
    Error     The method setRelatedModelObject(String, CreateVendor) is undefined for the type Request_CreateVendor     Request_CreateVendor.java     line 52
    Error     The method setRelatedModelObject(String, CreateVendorResponse) is undefined for the type Response_CreateVendor     Response_CreateVendor.java     line 52
    Error     The method setRelatedModelObject(String, Discard) is undefined for the type Request_Discard     Request_Discard.java     line 52
    Error     The method setRelatedModelObject(String, GetTransfersResponse) is undefined for the type Response_GetTransfers     Response_GetTransfers.java     line 52
    Error     The method setRelatedModelObject(String, GetVendors) is undefined for the type Request_GetVendors     Request_GetVendors.java     line 52
    Error     The method setRelatedModelObject(String, GetVendorsResponse) is undefined for the type Response_GetVendors     Response_GetVendors.java     line 52
    Error     The method setRelatedModelObject(String, Response_Abort) is undefined for the type Request_Abort     Request_Abort.java     line 66
    Error     The method setRelatedModelObject(String, Response_CreateVendor) is undefined for the type Request_CreateVendor     Request_CreateVendor.java     line 66
    Error     The method setRelatedModelObject(String, Response_DeleteVendor) is undefined for the type Request_DeleteVendor     Request_DeleteVendor.java     line 66
    Error     The method setRelatedModelObject(String, Response_Discard) is undefined for the type Request_Discard     Request_Discard.java     line 66
    Error     The method setRelatedModelObject(String, UpdateVendorResponse) is undefined for the type Response_UpdateVendor     Response_UpdateVendor.java     line 52
    Error     The method setRelatedModelObjects(String, List) is undefined for the type GetTransfersResponse     GetTransfersResponse.java     line 52
    Error     The method setRelatedModelObjects(String, List) is undefined for the type GetVendorsResponse     GetVendorsResponse.java     line 52
    Error     TYPED_MODEL_INFO cannot be resolved     TransferViewer.java     line 61
    Error     TYPED_MODEL_INFO cannot be resolved     VendorAdmWsModel.java     line 52

  • Is it possible to create findBy method for collection of ids?

    subj -
    I have a set of ids (HashSet of Integers).
    is it possible to create such findBy method which retrieves group of entity beans with ids specified in the set?

    You could do something like:
    PrimKeyBean
    public PrimKey ejbSelectPrimKey(Long key) throws FinderException;
    public Collection getPrimKeys(Collection keyset) {
      try{
        Vector output = new Vector();
        Iterator it = keyset.iterator();
        while(it.hasNext()){
          output.add(ejbSelectPrimKey((Long)it.Next()));
        return output;
      } catch (FinderException fe) {}
    ...deploymentdescriptor.ejb
    <query>
    <query-method>
    <method-name>ejbSelectPrimKey</method-name>
    </query-method>
    <ejb-ql>
    SELECT OBJECT(o) FROM pkTable o WHERE pkTablePK = ?1
    </ejb-ql>
    </query>
    ...client
    Collection c = primKey.getPrimKeys(keyset);
    ...

  • Invalid method declaration; return type required

    The code:
              public Reminder(int seconds) {
            timer = new Timer();
            timer.schedule(new RemindTask(), seconds*1000);
        class RemindTask extends TimerTask {
            public void run() {
                System.out.format("Time's up!%n");
                timer.cancel(); //Terminate the timer thread
    public static void main(String[] args)
              JFrame.setDefaultLookAndFeelDecorated(true);
              JDialog.setDefaultLookAndFeelDecorated(true);
              try
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              catch (Exception ex)
                   System.out.println("Failed loading L&F: ");
                   System.out.println(ex);
           new superball();
                    new Reminder(5);
            System.out.format("Task scheduled.%n");
    //= End of Testing =
        }Gives:
    "invalid method declaration; return type required"
    If i add void to public Reminder(int seconds) {It prints:
    cannot find symbol
    symbol : class Reminder
    location: class superball
    new Reminder(5);
    Is it because of the public class?
    public class superball extends JFrameHere is the FULL code:
    /*                      superball                                 */
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.regex.Pattern;
    import java.util.Timer;
    import java.util.TimerTask;
    import java.util.*;
    import java.io.*;
    * Summary description for superball
    public class superball extends JFrame
         // Variables declaration
         int ballx;
      int bally;
         int jumpstop;
         int stopper;
         int coin;
         int coinx;
         int coiny;
         int coinvaluex;
         int coinvaluey;
      Timer timer;
      private int value = 0;
         private static Random r = new Random();
         private JLabel jLabel1;
         private JLabel jLabel2;
         private JLabel jLabel4;
         private JLabel jLabel5;
         private JLabel jLabel7;
         private JLabel jLabel9;
         private JLabel jLabel10;
         private JPanel contentPane;
         private JPanel jPanel1;
         // End of variables declaration
         public superball()
              super();
              initializeComponent();
              // TODO: Add any constructor code after initializeComponent call
              this.setVisible(true);
          * This method is called from within the constructor to initialize the form.
          * WARNING: Do NOT modify this code. The content of this method is always regenerated
          * by the Windows Form Designer. Otherwise, retrieving design might not work properly.
          * Tip: If you must revise this method, please backup this GUI file for JFrameBuilder
          * to retrieve your design properly in future, before revising this method.
         private void initializeComponent()
              jLabel1 = new JLabel();
              jLabel2 = new JLabel();
              jLabel4 = new JLabel();
              jLabel5 = new JLabel();
              jLabel7 = new JLabel();
              jLabel9 = new JLabel();
              jLabel10 = new JLabel();
              coin = 1;
              coinx = Math.abs(r.nextInt()) % 460 + 100;
              coiny = Math.abs(r.nextInt()) % 200 + 100;
              ballx = 342;
              bally = 338;
              jumpstop = 0;
              stopper = 13;
              contentPane = (JPanel)this.getContentPane();
              jPanel1 = new JPanel();
              // jLabel1
              jLabel1.setIcon(new ImageIcon("IMG\\coin.gif"));
              jLabel1.setText("0");
              // jLabel2
              jLabel2.setIcon(new ImageIcon("IMG\\logo.PNG"));
              // jLabel4
              jLabel4.setIcon(new ImageIcon("IMG\\black.GIF"));
              // jLabel5
              jLabel5.setIcon(new ImageIcon("IMG\\ballstanding2.gif"));
              // jLabel7
              jLabel7.setIcon(new ImageIcon("IMG\\star-heart.gif"));
              jLabel7.setText(" 100");
              // jLabel9
              jLabel9.setIcon(new ImageIcon("IMG\\coin.gif"));
              // jLabel10
              jLabel10.setIcon(new ImageIcon("IMG\\stage1.GIF"));
              // contentPane
              contentPane.setLayout(null);
              contentPane.setBackground(new Color(255, 254, 254));
              addComponent(contentPane, jLabel5, 342,338,60,18);
              addComponent(contentPane, jLabel1, 561,4,100,18);
              addComponent(contentPane, jLabel2, 2,3,208,24);
              addComponent(contentPane, jLabel7, 495,4,60,18);
              addComponent(contentPane, jLabel9, coinx,coiny,19,18);
              addComponent(contentPane, jLabel2, 2,3,208,24);
              addComponent(contentPane, jLabel10, -2,29,738,412);
              addComponent(contentPane, jPanel1, 79,209,200,100);
              // jPanel1
              jPanel1.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
              jPanel1.setFocusable(true);
              jPanel1.addKeyListener(new KeyAdapter() {
                   public void keyPressed(KeyEvent e)
                        jPanel1_keyPressed(e);
                   public void keyReleased(KeyEvent e)
                        jPanel1_keyReleased(e);
                   public void keyTyped(KeyEvent e)
                        jPanel1_keyTyped(e);
              // superball
              this.setTitle("Superball created by Hannes Karlsson");
              this.setLocation(new Point(0, 0));
              this.setSize(new Dimension(617, 450));
              this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              this.setResizable(false);
         /** Add Component Without a Layout Manager (Absolute Positioning) */
         private void addComponent(Container container,Component c,int x,int y,int width,int height)
              c.setBounds(x,y,width,height);
              container.add(c);
         // TODO: Add any appropriate code in the following Event Handling Methods
         private void jPanel1_keyPressed(KeyEvent e)
              System.out.println("\njPanel1_keyPressed(KeyEvent e) called.");
              // TODO: Add any handling code here
              if(e.getKeyCode()==e.VK_LEFT) // when the user enters left
                  jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setIcon(new ImageIcon("IMG\\ballroll.gif"));
                        } // equalling PLAIN_SPEED
                                            if(e.getKeyCode()==e.VK_RIGHT) // when the user enters right
                  jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setIcon(new ImageIcon("IMG\\ballroll.gif"));
                        } // equalling PLAIN_SPEED
                                                                if(e.getKeyCode()==e.VK_UP) // when the user enters up
                  jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setIcon(new ImageIcon("IMG\\balljetpack.gif"));
                        } // equalling PLAIN_SPEED
                                                                                    if(e.getKeyCode()==e.VK_DOWN) // when the user enters up
                  jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setIcon(new ImageIcon("IMG\\ballroll.gif"));
                        } // equalling PLAIN_SPEED     
                        if(bally>=340)
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                  System.out.println("LOW!!!");
                        if(bally<=-2)
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                                  System.out.println("HIGH!!!");
                                            if(ballx>=594)
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                                  System.out.println("RIGHT!!!");
                                                                if(ballx<=-3)
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                                  System.out.println("LEFT!!!");
                                                                           if (bally==294 && (ballx > 218 && ballx < 274))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                                                           if (bally==262 && (ballx > 246 && ballx < 306))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                                       if (bally==230 && (ballx > 486 && ballx < 562))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                        if (bally==310 && (ballx > 486 && ballx < 594))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                         if (bally==262 && (ballx > 442 && ballx < 514))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
          if (bally==294 && (ballx > 378 && ballx < 466))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                   // COIN
                         if ((bally > coiny-10 && bally < coiny+10) && (ballx > coinx-10 && ballx < coinx+10))
                coinx = Math.abs(r.nextInt()) % 617 + 1;
                coiny = Math.abs(r.nextInt()) % 300 + 1;
                   jLabel9.setLocation(new Point(coinx, coiny));
                        System.out.println("Coinx:"+coinx+"");
                        System.out.println("Coiny:"+coiny+"");
                        jLabel1.setText(""+ coin++ +"");
                        System.out.println("Ballx:"+ballx+"");
                        System.out.println("Bally:"+bally+"");
         private void jPanel1_keyReleased(KeyEvent e)
              System.out.println("\njPanel1_keyReleased(KeyEvent e) called.");
              // TODO: Add any handling code here
              jLabel5.setIcon(new ImageIcon("IMG\\ballstanding2.gif"));
         private void jPanel1_keyTyped(KeyEvent e)
              System.out.println("\njPanel1_keyTyped(KeyEvent e) called.");
              // TODO: Add any handling code here
         // TODO: Add any method code to meet your needs in the following area
    //============================= Testing ================================//
    //=                                                                    =//
    //= The following main method is just for testing this class you built.=//
    //= After testing,you may simply delete it.                            =//
    //======================================================================//
              public void Reminder(int seconds) {
            timer = new Timer();
            timer.schedule(new RemindTask(), seconds*1000);
        class RemindTask extends TimerTask {
            public void run() {
                System.out.format("Time's up!%n");
                timer.cancel(); //Terminate the timer thread
         public static void main(String[] args)
              JFrame.setDefaultLookAndFeelDecorated(true);
              JDialog.setDefaultLookAndFeelDecorated(true);
              try
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              catch (Exception ex)
                   System.out.println("Failed loading L&F: ");
                   System.out.println(ex);
           new superball();
                    new Reminder(5);
            System.out.format("Task scheduled.%n");
    //= End of Testing =
    }

    No, it's because you can't have a constructor called Reminder if you don't have a class named Reminder.

Maybe you are looking for

  • ITunes and Windows Installer Package - HELP!!!!

    I've seen my question, which is also MY problem, that Windows Installer Package will not allow ITunes to download. I've read several posts on possible "fixes" in several forums, and have yet to resolve my problem. Anyone know how I can fix this? I wo

  • How can i dynamically update a table in my program?

    Hi there! I would like to know if anyone can assist me with advice on how to dynamically update a table within my program, with new values from the database? Thanking You all.

  • Metronome click recorded onto audio track , can not separate during playbac

    I set the metronome for "click during recording only" and for some reason the metronome clicks on this audio track during playback as well. I am recording an audio track from a Kurzweil 2500sx keyboard. Please comment ? David

  • Workflow Suspended error in sharepoint 2013

    Hi, I have created one list and attached one workflow to send notification mail when item is creatd. The problem is while i created the item ,notification mail triggers.But the when other user creates item,the workflow get suspended and showing the f

  • Regarding BDC session

    Hi i am processing my BDC pro. in Session method. my requirement is i have to capture the error records into a file and i have to write that file on appl. server. how to capture the error records from error log? please reply