How to create and instance of Java Object from an XML Document.

Hi,
How can we use a XML Document to create an instance of Java Object and do vice versa ie from the Java Object creating the XML Document.
XML Document is available in the form of a String Object.
Are there helper class available to achieve this.
I need to do this in a Servlet.
Regards
Pramod.

JAXB is part of JavaSE while Xmlbeans claims full schema support and full infoset fidelity.
If the standard APIs do all that you need well then use them.

Similar Messages

  • How to compile and run a .java file from another java program

    hello,
    can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?

    Well a smarter way of implementing this is by using a solution provided by Java Itself.
    If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
    http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
    How do i do that ??
    Check out the below articles which would help you of how to do that
    http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
    http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
    http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
    Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
    Hope that might help :)
    REGARDS,
    RaHuL

  • How to Create a Instance of Business Object Inside a class?

    Hi All,
           I am facing a problem regarding ,  creating a instance of BO inside a global class ( SE24 ). Initially I have included <CNTN02> in the class and i even tried to use the MACRO SWC_CREATE_OBJECT but , the main issue is that my method exporting parameter is not accepting the type SWC_OBJECT in the class for this reason I am not able to pass the instance of the BO.
    Any suggestions
    Can we acheive this through classes
    Do I need to perform Type casting?
    Thanks In Advance
    Pavan

    Hello Pavan
    On ERP 6.0 you find the following documentation in include :
    * BITTE NEUES INCLUDE CNTN01_SWC benutzen!!!
    * Dieses Include führt bei der Nutzung innerhalb eines CLASS-POOLS zu
    * einer Vielzahl von Warnungen. Um dieses zu vermeiden, bitte das oben
    * genannte Include in den lokalen Implementierungsteil einer gloabeln
    * Klasse inkludieren.
    *************************** Macros *************************************
    * Types
    TYPES:
      swc_object LIKE obj_record.
    Basically it says that you should replace this include with the new include CNTN01_SWC.
    If you add type-pool SWC0 to the properties section of your global class you can define method parameters having type SWC0_OBJECT which should be identical to SWC_OBJECT:
    TYPE-POOL swc0.
    * Types
    TYPES:
      swc0_object LIKE obj_record.
    Regards
      Uwe

  • How to create new instance of the process from external web apps?

    Hi Everyone,
    How to create a new instance of the process which deploy to the weblogic server from the external web app?
    Thank you.

    Assuming the process includes a message start event, the simplest way is to use Web Service call. Once you've deployed the process you can use Enterprise Manager to get the URL of the WSDL. There's and icon at the top of the composite summary page for getting the WSDL, or you can get it from the test page. Use that WSDL URL to construct the client to use from the web app. If it's an ADF client you can generate either an ADF Data Control or a client proxy.

  • How to create a universe in Business Object from BW

    Dear Memebers
    I need your help, I'm trying to create a report in business object using a cube as datasource, but when execute it does not appears the text, for example costumer 1000, his name is coca-cola.
    Does anyone help me?, maybe i does not set something
    Thanks a lot
    Ariel

    Hi Ariel,
    Not sure what BW is? If this is not related to using a SDK you may want to post your question in the Business Objects enterprise or Crystal Report Designer Forum.
    Thank you
    Don

  • How to create a smallest file size pdf from indesign CS4 document

    How to create a smallest file size pdf (suitable for upload to a website) from indesign CS4 document which contains multiple illustrator CS4 illustrations.
    I have chosen the "smallest file size option" but the pdf file is over 30MB, can anyone help please.
    Thank you

    One trick is to
    Set the placed graphics to have a transparency of 99.9% (you can do this with Find/Change and select Objects)
    This is enough to force the graphics throught the Transparency Flattener
    Next set the Transparency Blend Space to RGB (Edit>Transparency Blend Space)
    Next set a custom Transparency Flattner Preset Edit>Transparency Flattner
    Next
    Use File>Export and choose
    Smallest file size
    PDF Compatibility Acrobat 4 (PDF 1.3)
    In Advanced Section - go to transparency and selec the new Flattener Preset you created.
    *this will convert your vectors to raster, but it should reduce your file size

  • How to terminate and restart a java program from a controling java program?

    I have a situation where my program needs to run exactly once each one
    hour. This is a huge program that creates a lot of threads and opens
    lot of resources. After one hour has lapsed, I want to terminate this
    program (as if Exit(0) was performed on it or as if Ctrl C was pressed
    from the command line to terminate a running program) and then run it again and so on repeat the cycle each hour. This will guarantee that
    all the resouces taken by the programs are freed or if some threads were still blocked on i/o, are indeed terminated each hour.
    The java program does not have any user interface and it is run from the
    command line.

    if you can change the program to be controlled, you could make it listen for commands on some networkport for shutting it down.
    If this is not an option you could start OS programs to kill the first program. On Unix System kill will do, but you need the process id so you'd need another os call ...
    You could do the os calls in two ways
    a) execute shell commands (search the forum on how to do that
    b) write a little C wrapper for the os call so you can call them from JNI (Java Native Interface)
    I do not know of any way do this kind of thing directly
    regards
    Spieler

  • How to create and export a still frame from a movie in iMovie 09

    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.
    Are you working in iMovie and realize that certain frames in the movie would be perfect as photographs? Here is how to extract them...
    *To get a still frame from an Event*, right-click on the frame and select "Add Still Frame to Project". The still will be added to the end of the current project. Right click on the still frame in the project and select "Reveal in Finder". You will see a jpeg file that is highlighted. Drag this jpeg file in the finder to the iPhoto icon on your dock.
    *If you want a still from a project*, rather than an event, the process is similar, except you right-click on the frame and select "Add Freeze Frame", and it adds the freeze frame at the end of the clip rather than at the end of the project. Right-click/reveal in Finder, drag JPEG to iPhoto icon in dock.
    *If you are not using iPhoto*, and just want to save to your desktop, click Reveal in Finder as above, then COPY, then PASTE to desktop.
    Hint: If you do not want to clutter up your iMovie Project with stills at the end that you would have to go back and delete, then create a separate iMovie Project just for your stills, and follow the instructions for capturing stills from an Event.
    Note: If you do not have a right mouse button, then control-click will work instead of right-click.
    This is the 1st version of this tip. It was submitted on Dec 5, 2009 by AppleMan1958.
    Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.

    First, click iMovie/About and see which version you have.
    Versoon 9.0.2 would be iMovie 11.
    Follow the instructions [in this post|http://discussions.apple.com/message.jspa?messageID=13065602#13065602]
    If you have Version 8.0.6, that is iMovie 09 and you should see the Reveal In Finder option.

  • Re: How to create and export a still frame from a movie in iMovie 09

    The tip above is ready to be posted.

    First, click iMovie/About and see which version you have.
    Versoon 9.0.2 would be iMovie 11.
    Follow the instructions [in this post|http://discussions.apple.com/message.jspa?messageID=13065602#13065602]
    If you have Version 8.0.6, that is iMovie 09 and you should see the Reveal In Finder option.

  • How to insert data into a table from an xml document

    using the XmlSql Utility, how do I insert data into a table from an xml document, using the sqlplus prompt.
    if i use the xmlgen.insertXML(....)
    requires a CLOB file, which i dont have, only the xml doc.
    Cant i insert directly from the doc to the table?
    the xmlgen examples I have seen first convert a table to a CLOB xmlString and then insert it into another table.
    Isnt there any other way?

    Your question is little perplexing.
    If you're using XML SQL Utility from
    the commandline, just use putXML.
    java OracleXML putXML
    null

  • 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 to create and install a toolbar to a browser using java

    Hi all,
    Can any one guide me about how to create and install toolbar to a browser using java ??
    please any one help me about this,i am not getting any idea about this..
    Thanks and Regards
    Sandesh S

    I doubt you can. Those browser toolbars are done by implementing to an API provided by the browser. That API, I don't believe, is provided via Java. But of course, that would be entirely up to the browser, not Java.

  • How to create and call a COM component in Java

    Hi All,
    can you suggest how to create and call a COM component..or if have any sample simple application can you send it to me...i will try to develop my project.
    actually i am configuring a OCR Engine using SDK which is in VB .Net when i contacted their support they told that if i have any sample COM based component Project they will help me...
    So please can you help in this.
    Thanks in advance.

    As said by my fellow posters Java Devolopment Environment (Except Microsoft implementation of JVM,this is no longer supported by MS themseleves) does not provide an built-in support to serve this cause.
    If you are looking to devolop a custom based solution the below is a good place to start with where end user is talking about Java <=> JNI <=> Native <=> COM connectivity.
    [http://bloggershetty.blogspot.com/2004/12/java-jni-com-activex-bridge-lots-of.html]
    However,if you are looking for ready made solutions ?
    Implementation any one of the solutions stated below might serve your cause.
    Open Source Solutions:
    [http://j-interop.org/]
    [http://www.danadler.com/jacob/]
    Commercial Solutions:
    [http://javacombridge.com/]
    [http://www.jnbridge.com/]
    [http://www.nevaobject.com/j2cdetails.asp?kw=java%20com%20bridge]
    [http://j-integra.intrinsyc.com/]
    Hope this might help :)
    REGARDS,
    RaHuL

  • How to create an instance (or instances) of the java card applet?

    Here I have a backend, a host application (a terminal)
    and a Java card that needs to be instanced to multiple cards to different users.
    I wonder how you can make instances of Java card applets of different IDs or PINs.

    933351 wrote:
    Yes, I would like to emulate an environment first, Unfortunately I cannot help with this (never really used this tool).
    I'd like to know also how to install them later on real cards.You need something that can perform the secure channel and card content management functions of the GlobalPlatform card specification. A good starting point is GPShell. It provides a simple scripting interface to be able to:
    1) Authenticate with a card with developer keys
    2) Load you cap file(s)
    3) Instantiate any instances you require (you can have multiple instances from a single applet)
    4) Send arbitrary APDU's to the card for testing.
    GPShell has a README text file that is a good reference and there are sample scripts for a number of card types.
    - Shane

  • What is an Instance in application server and how to create an Instance?

    Hi All,
    What is an Instance in application server and how to create an Instance? What is the procedure to get file path from an Instance?
    What is the significance of Instance in ABAP?

    hi
    good
    go through these links,this will gives you complee idea about the creating instances in application serverl.
    http://www.erpgenie.com/sap/basis/
    http://www.sapdevelopment.co.uk/file/file_disall.htm
    thanks
    mrutyun^

Maybe you are looking for

  • Logical error in creating tables using db link in solaris

    Hi, While creating table using the syntax create table newtab...as select * from tab@dblink .. I am facing a problem. The newtab table created is having a structure different (from datalength point of view of varchar2 and char datatypes) from the sou

  • Why do I lose signal since updating to iOS 5.1?

    Hi, Since I updated my iOS from 5.0.1 to 5.1, my iPhone: 1) Takes a lot more time finding the network when I turn it on. 2) Frequently loses reception and searches for network for 10-30 seconds before going back on the network full strength. The weir

  • Make my field as input not possible.....

    Hi all... in module pool screen.....     How can i make one input field as "input not possible" for one perticuler condition met?? ex:   iam having one input field in my screen.... so i can enter the values for it.... similer ly iam also having anoth

  • Sap crm oppt.

    dear business experts, i want to know the future( oppurtunities) of sap crm.pls help me.

  • Oracle Issue around handling CLOB within Workflow Transaction

    Hi, - In Workflow Notification Message I am using an CLOB Document for building the message Body - This CLOB value is going to be SELECTed and initialized from a TABLE (having CLOB column) during the document related procedure execution NOTE: In orde