How to Create new entry, while keeping CoS and nsRoles in tact...

Hi,
Here's the short version:
How can one create a new entry/context in DS, copy the attributes from an existing entry (using JNDI) and save them in the new entry/context WITHOUT duplicating CoS or nsRole/DN info.
Long version of the question:
We are using DS 5.2 and Portal 6 (and messenger/calendar etc). We have our employees saved in DS. What I want to do is change a user's name/uid by copying the user's attributes (in JNDI) and create a New entry with the New uid, with all the other attributes the same. Then deleting the original entry.
This is what I have done...
1. Get all the employee's attributes... (abriviated)(ctx is the DirContext)
NamingEnumeration answer = ctx.search(searchBase, filter, ctls);
SearchResult sr = (SearchResult)answer.next();
Attributes attrs = sr.getAttributes();
2. Create a new employee with the same attributes (assume I use a different uid in the dn)
ctx.createSubcontext(dn, attrs);
This works...it copies all the attributes to the new entry -BUT- when you look at the LDIF file, it ADDS several more attributes to the new entry.
Example: it adds the following...
sunPortalNetletRules
sunPortalGatewayEnableSSO
sunPortalDesktopDpDocument
sunPortalDesktopDpLastModifiedUser
iplanet-am-user-auth-modules
And about 20 others...
Now if I am not mistaken, these are the CoS and roles that the DS uses and propagates down to the entry. But when I copy the attributes over, (using JNDI) I get these attributes too but I want to copy only the attributes that are unique and have DS handle the roles and CoS like it does for the original entry.
Is there a way to tell the DS to just use the CoS or roles instead of duplicating all these attributes in this individual entry??? (and do it using JNDI)
(sorry this question is sooooo long.)
Thanks!
Eric

Hello Viji,
I am extremely thank ful for the document.
Kindly help me with below points of possible
1)     if it is standard table (LFBK) , even then shall we will need to do the generate program 
step in SCDO ?
2)     does it generate Z-function module ?
3)     do we need to call this function module at appropriate places to update the CDPOS and CDHDR 
for changes in the standard table ?
4)     I have already created custom business object for LFBK so that Iu2019ll be able to create entry 
in SWEC (fyi)
5)     how and when are the method used in the table maintenance generator called ?
6)     Page 14 point 3 says that "Add a new entry to link the Change Document Object ZPRPS_CD and 
table ZPRPS so that changes are recorded when table entries change."
Does this mean that once we create SCDO and generate program, these two steps are  enough 
for the SWED entry to create change log in CDPOS and CDHDR ?
7)     It is understood that it is necessary that the change object in SWEC should be logged in 
CDPOS and CDHDR only then the event would be created for the SWEC entry. is this correct ?
in order to create change log for the change object in CDHDR and CDPOS, is the SCDO entry 
and generate program steps enough or the methods of table  maintenance generator are also 
required ?
thank you very much for your time
B

Similar Messages

  • How to create new subsite while adding new item to the list by using javascript?

    hi,
    I hav a task ie, when I add item to the list then subsite will create with that list item title and description . So By using javascript, I have to create subsite while adding new item to the list.
    Help me to solve this.
    Thank you, 

    Is your item getting added through Javascript client object model ? If yes, you can write in the success delegate of your list creation method the logic to create the subsite.
    function CreateListItem()
    var clientContext = new SP.ClientContext.get_current();
    var oList = clientContext.get_web().get_lists().getByTitle('List Name');
    var itemCreateInfo = new SP.ListItemCreationInformation();
    this.oListItem = oList.addItem(itemCreateInfo);
    oListItem.set_item('Title', 'My New Item!');
    oListItem.set_item('Body', 'Hello World!');
    oListItem.update();
    clientContext.load(oListItem);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.CreateListItemOnSuccess), Function.createDelegate(this, this.onQueryFailed));
    function CreateListItemOnSuccess() {
    var subsiteTitle = oListItem.get_item('Title');
    //Logic to create a subsite
    function onQueryFailed(sender, args) {
    I have added a sample flow for the above scenario. Have a look at the following lnk for how you can craete a subsite using ecmascript.
    http://ravisoftltd.wordpress.com/2013/03/06/sharepoint-2010-create-site-with-ecma-script-with/
    Geetanjali Arora | My blogs |

  • How to create new field while upgrading from CRM 4.0 to 7.0

    Hi ,
    How do we create new field on UI and store data into existing field in database?
    Is there any option in AET to skip the creation of new field in the database table ?
    Custom field is already created in GUI and database table while using CRM 4.0
    Now, after upgrading to 7.0 EHP3 , I need to bring this field on the UI .
    Using AET may create new field again in the database table.Please suggest.
    New filed needed to be created in Marketing Campaign Element Header data.
    Thanks
    Jayasri

    Hi Jayasri,
    As a custom fields are already there in crm 4.0. You don't need to use AET again to add field.
    These enhancements still exist after the upgrade. Dependent on the enhancement object and type some manual steps are necessary.
    For example regarding a single field enhancement for the BP the whole framework is enhanced after the upgrade. There is only one manual step to bring the field on the relevant view(s) via the UI Configuration Tool. For whole BP tables some more manual steps are necessary, these steps are described in the note 1069791 - CRM WebClient UI for EEW enhancements (reference to more notes regarding the EEW after the upgrade).
    For set types, we need to generate UI With the help of the UI configuration tool the settypes could become visible in the Web UI.
    I didn't understood your scenario, can add little more information why you want to add field by AET if available in DB?
    Refer
    FAQ - SAP CRM Upgrade from release 4.0 to 7.0 
    Regards,
    Arjun

  • How to create new folders while installing the VI in some other PC

    Hi,
         I want to create a folder while installing the VI to some other maching using installer/setup.exe and also i want to copy some excel file to the c: drive of installing PC while installing is their anyway to do this. Please help me in this regards
    Regards
    Shivakumar Singh

    Hi
    If you are installing vi from CD, then you might use the first approach with application builder.
    If you just want to use any CD, than I think you should consider some interactive script with the user.
    You can easily creat one with the windows commands, by means of *.cmd files. You can read about it by typing "help cmd" and/or "help" in the RUN in Windows. Then I propose to search the web for some examples on how to write the cmd scripts. If you know TCL there will be no problem for you.
    You can also try to ask some dudes on the WinNT newsgroup. They will write it in no time.
    Unfortunatelly I have now no time to write the script for you.
    good luck
    Pawel

  • How to create new entry in SAP easy menu ?

    Hi gurus,
    In the project I need to create a new tree like a tree in the SAP easy menu , Is there any ways for doing this ?
    For example:
    I want to have a menu like this
    -Root menu
             - Branch text 1
                       Transaction 1
                       Transaction 2.
             - Branch text 2
                       Transaction 3
                       Transaction 4.
    Thanks in advance,
    Points rewarded immeadiately

    Hi,
    try TCODE SE43.
    Regards, Dieter

  • How to create new Sheet in Excel file and write into it

    Hi to all, my requirement is this:
    I have an excel file (.xls) with multiple sheets (three sheets for precision: sheet1, sheet2 and sheet3).
    I must create in the same excel file new sheet, say sheet4, read data from sheet1, sheet2 and sheet3 and write them into sheet4.
    How to realize this in SSIS?
    Expecially, Is it possible to realize this in SSIS?
    thanks in advance.

    You need to create the sheet with the required metadata. There's no use creating blank sheet.
    Also metadata has to be fixed using a sample sheet prior to start of the package for setting the mapping. You may create a excel template for this purpose to just set the mapping at design time.
    At runtime pass actual excel sheet path for ExcelFilePath property of the source to point to correct file.
    Also the create table statement should include the same metadata info (columns)
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
    Hi, well it works fine! I have used a sample sheet prior to start of the package for setting the mapping.
    Next at run time  pass actual excel sheet path for ExcelFilePath property of the source to point to correct file.
    However I have set also ValidateExternalMetadata properties of the Excel Destination to false and DelayValidation properties of the package to true.
    Now my problem is the following:
    I stored the three sheets name (sheet1, sheet2, sheet3) in the Object type user variable through a script task and the foreach loop loops through the three sheets stored in the variable.
    Now, I want that at each iteration the CURRENT VALUE of the Object type user variable is mapped into another user variable wich in turn is given in input to the Excel Source.
    Resuming:
    -) I have to copy the content of three sheets (sheet1, sheet2, sheet3) of excel file into another new sheet,   sheet4.
    -) I stored the three sheets name (sheet1, sheet2, sheet3) in the Object type user variable.
    -) With a  foreach loop container I loops the three sheets stored in the Object type user variable.
    -) Within a foreach loop container I have a Data Flow Task that transfer data from source sheet (sheet1, sheet2, sheet3) into destination sheet, sheet4.
    -) PROBLEM: how to change dinamically at each iteration of the foreach loop the name of source sheet? In the destination excel Task the sheet is always the same at each iteration, sheet4. But in the source excel task the name of sheet musts change at each
    iteration. In particular at the first iteration the name of the source sheet must be "sheet1$", at the second iteration "sheet2$", in the last iteration "sheet3$".
    How to change sheet name dinamically at each iteration?
    thanks.

  • How to create new structure for SOP?

    How to create new structure for SOP? and transfer data for long term planning?

    hi dear
    For SOP there are two types
    1. Standard SOP : this the standard SOP  configured by SAP consider the Level by Level planning and planning done for product group .
    2. Flexible planning SOP: this option is given, so that Rough planning/SOP planning can be done as per the client requirement.e.g planning structure can be sales orgn., distribution channel, division, plant, material
    For configuring the flexible planning SOP follow steps
    1. Define info structure in IMG
    where u define the characteristic and Key field
    2. Set parameters for info structures and key figures
    Sales & Operations Planning >Master Data>Set parameters for info structures and key figures
    where u define  Planning method
    Consistent planning
    Level-by-level planning
    Delta planning
    and aggregation type
    1. Average calculated
    2. Total created
    3. No aggregation
    3. create Planning type with reference to info structure
    Regards
    Suresh

  • How to create new country and cities under country?

    hello,
    i am using 11.5.5 apps version,
    want to create new country and cities under that country, please tell me what is the procedure for that.
    i am using demo vis:
    operations as user.
    Thanks
    yash

    Hi,
    Please check below notes which could be helpful for your issue
    How to Add a New Legal Entity, Ledger and Operating Unit for a New Country [ID 1064366.1]
    How To Create New Countries In The Regions And Zones Form [ID 739798.1]
    How To Enter New Countries or Territories Into The FND_TERRITORIES Table? [ID 341032.1]
    How To Add New Legal Entity Registration Code For Countries That Are Not Available In The List? [ID 604280.1]
    Regard
    Helios

  • Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is:

    Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is: "Error creating EntityBean: Io exception: The Network Adapter could not establish the connection".
    while executing JSP:<%
    * add.jsp
    * Adds a new entry through EmployeeBean. This is a JSP that serves 2
    * functions. First of all, when called with no arguments, it will display a
    * table with a few input fields. The user should enter empNo, empName and
    * salary of the new record to be added. When she submits this
    * information, it is sent to this page again. If it is successful, then the
    * user can continue adding new entries. If it is not, then the old data will
    * be displayed, and a warning message will be shown to her.
    %>
    <%@ page import="com.webstore.*,java.io.*,java.util.*,javax.naming.*" %>
    <%
    // Make sure this page will not be cached by the browser
    response.addHeader("Pragma", "no-cache");
    response.addHeader("Cache-Control", "no-store");
    // We will send error messages to System.err, for verbosity. In a real
    // application you will probably not want this.
    PrintStream errorStream = System.err;
    // If we find any fatal error, we will store it in this variable.
    String error = null;
    // In a moment we will check if all columns were passed to this page
    String param_1 = "";
    String param_2 = "";
    String param_3 = "";
    long dptNo = 0;
    String dptName = null;
    // This variable indicates what function of this page is currently used. If
    // this page is called with parameters, then a new entry should be
    // added. In that case this variable is true.
    boolean submitting = false;
    // We will first attempt to get the reference to EmployeeHome from the
    // session. The "list.jsp" page sets this attribute in the session.
    DepartmentHome home = (DepartmentHome) session.getAttribute("DepartmentHome");
    if (home == null) {
    error = "No previous connection to DepartmentBean.";
    } else {
    // Attempt to get all 3 parameters from the session
    param_1 = request.getParameter("DPTNO");
    param_2 = request.getParameter("DPTNAME");
    // If all 3 parameters are specified, then this is probably a submission by
    // this very page. Note that if the user left one of the fields blank, then
    // the corresponding parameter will be "", not null.
    if (param_1 != null && param_2 != null) {
    param_1 = param_1.trim();
    param_2 = param_2.trim();
    submitting = true;
    // In the following variable we will store a (non-fatal) warning message. This
    // message will be displayed in the page, but so will the submission form.
    String warning = null;
    if (submitting) {
    warning = "";
    // If there is an empty param_1, param_2 and/or param_3, then this will be noted
    // in the warning message.
    if ("".equals(param_1)) {
    warning = "Null param_1 specified. ";
    if ("".equals(param_2)) {
    warning += "Null param_2 specified. ";
    // If we don't have a warning message yet, then we will attempt to create
    // a new record.
    if ("".equals(warning)) {
    try {
    dptNo = (long)Long.parseLong(param_1);
    dptName = new String(param_2);
    Department rec = (Department) home.create(dptNo);
    rec.setDptname(dptName);
    // empty columns after insert for effect
    param_1 = "";
    param_2 = "";
    // If we got this far, then there was no problem detected.
    warning = null;
    } catch (Exception e) {
    // Set the warning variable to indicate a problem.
    warning = "Unable to create new entry, caught: \"" +
    e.getClass().getName() + "\", message is: \"" +
    e.getMessage() + "\".";
    // Decide what the title will be.
    String title;
    if (error != null) {
    title = "Error";
    } else {
    title = "com.webstore | Add entry";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <HTML>
    <HEAD>
    <TITLE><%= title %></TITLE>
    </HEAD>
    <BODY bgcolor="#FFFFFF">
    <H1><%= title %></H1>
    <%
    // If there was a fatal error, then display the error message
    if (error != null) {
    %>
    <P><BLOCKQUOTE><%= error %></BLOCKQUOTE>
    <%
    // Otherwise display a table with fields to be filled in.
    } else {
    // If there was a warning, then display it.
    if (warning != null) {
    %>
    <TABLE border="1" bgcolor="#FF2222">
    <TR><TD><FONT color="#FFFFFF"><STRONG>Warning: <%= warning %></STRONG></FONT></TD></TR>
    </TABLE>
    <%
    } /* if */
    // Display the table with fields. There are two columns. The left column
    // contains the names of the fields, while the right column contains the
    // fields.
    %>
    <FORM action="dptadd.jsp" method="GET">
    <P><TABLE border="1">
    <TR>
    <TD><STRONG>DptNo:</STRONG></TD>
    <TD><INPUT type="text" name="DPTNO" value="<%= param_1 %>"></INPUT></TD>
    </TR>
    <TR>
    <TD><STRONG>DptName:</STRONG></TD>
    <TD><INPUT type="text" name="DPTNAME" value="<%= param_2 %>"></INPUT></TD>
    </TR>
    <TR>
    <TD colspan="3" align="center"><INPUT type="submit" value="Add this entry"></INPUT></TD>
    </TR>
    </TABLE>
    </FORM>
    <%
    } /* else */
    %>
    <P><TABLE border="1">
    <TR><TD>Back to list</TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    Please guide me..

    Rajive,
    This is the same problem as in your other post:
    sql is running very slow
    So please refer to my answer there.
    Good Luck,
    Avi.

  • Unable to create new entry in table that has no primary key

    Hi
       I have a table which is required to have no primary key (except mandt). After i generate table maintanance, when I go to create new entries, the table control to enter the new values does not appear. When I click on edit->new entries, it goes back to the fields tab of the table. Same when i check through SM30.
    If i maintain atleast one primary key, I am able to get the table control in new entries screen. However the requirement permits no primary keys except mandt. How can this be resolved?
    Thanks
    NM

    Hi,
    THE PROBLEM WITH UR TABLE IS
    YOU HAD DECLARED MANDT AS THE PRIMARY KEY AND THERE IS NO OTHER KEY IN UR TABLE
    iT'S NOT ALLOWING YOU TO ADD NEW ENTRIES BECAUSE MANDT IS THE ONLY PRIMARY KEY IN YOUR TABLE AND IT WILL HAVE A DEFAULT VALUE BASED ON THE CLIENT. SO  IT'S NOT SHOWING YOU THE CREATE NEW ENTRIES OPTION.
    SO TRY TO PUT ONE MORE FIELD AS THE PRIMARY KEY SO THAT YOUR PROBLEM WILL SOLVE VERY EASILY  ALSO MAKE SURE THAT TABLE IS ACTIVATED.
    REVERT IF U NEED SOME MORE HELP
    Thanks &Regards.
    Pavan.

  • How to create new account determination in OBYC

    Dear SAP Guru,
    I'm getting error 'Maintain account determination (table T030B) for posting ST3' upon GR (posting) against PO. I noticed name of the procedure or group of procedures for which automatic postings can be generated is NOT maintain for ST3 in OBYC (Maintain FI Configuration : Automatic Posting - Procedure). Appreciate if you could show me the path or t/code how to create new procedure for ST3 & maintain in OBYC. Thank you.
    rgds,
    nantha

    Hello Nantha,
    Transaction key can be created in
    SPRO - MM - Purchasing - Conditions - Define Proce determination Process - Define transaction/event key
    Here go for new entries and maintain the transaction key with a description.
    Then go to M/08 and maintain the transaction key in the 'acct key' field for your pricing procedure and the condition type.
    Also make sure to tick the 'Accruals' tickbox in M/06 for the condition type you want to post in the account key.
    Now go to OBYC and maintain the G/L accounts along with the posting keys and the posting rules as explained in my previous reply.
    Regards
    Gregory Mathews

  • How to create new authorisation object for Transactions?

    Hi,
    How to create new authorisaton object and how to assign that object on a transaction code?
    Case ->
    The transaction code VL01N have the object called V_LIKP_VST under Class "LE_V" that have two auth. fields. one is 'Activity' and other one is "Shipping Point/Receiving Point".
    Here I want to add "Storage location" also. I have created one object called "Z_LIKP_VST" under same calass "LE_V". and added "Activity", "Shipping Poing/Receiving Poing" and "Storage Location". After that I added that object ("Z_LIKP_VST") for particular transaction through "SU24". I maintained the "Display check indicator" for VL01N.
    I created one new role and assigend the particular transacation for a user. but still SAP taking  V_LIKP_VST insted of Z_LIKP_VST.
    How can I change my Z_LIKP_VST on profile.
    Please help
    Thanks in Advance
    Lal

    Hi Kariyath,
    I suppose its not about interest but a MUST.. sorry but.. unless u include the Logic in the program how can SAP pick these custom Z objects ?
    after u create them and assign to a Tcode in SU24 there is no logic to check these objects. Frankly i see no other chance.... unless SAP comes to us with a great easy way to input these Custom objects
    Keep looking and please Update me if u have any Inputs....on this front..
    All the Best
    Br,
    Sri
    Award points for helpful answers

  • How to create New Work Center

    Dear Experts
                      How to create New Work Center?, what are all the inforamtions  need while creating workcenter.
    Regards
    Rajakarthik

    Hi,
    In addition to the above post, you need to identify that:
    1. Whether you need separate activity types and cost center for the newly created work center. These details are entered in the Costing View of the Work Center.
    If these are required then use KL01 to create new activity, KP26 to define the activity price.
    If required create cost element using T Code KA01 and Cost Center using KS01.
    Take help from the CO guy on this.
    2. Also  you need to ask the concerned about the operating times for the wor center. That is Start time and End time of WC. It is used for capacity evaluation and scheduling of the orders. It is maintained in the capacity view (Bottom left Button in the view).
    this view will also contain the details regarding the calendar, to be assigned to the work center, if needed. Collect details for this requirement. Also you can assign a different calendar to WC apart from factory calendar.
    3. Find out whether this WC will be operating in shifts or not. Accordingly maintain the details.
    Hope it is useful for you.
    Revert for clarifications
    Regards,
    Rohit.

  • How to create new scope for SharePoint calendar?

    How to create new scope for SharePoint calendar?
    I have a calendar list to which I want to create following scopes-
    Annual View
    Half Year 1 (Jan-June)
    Half Year 2 (Jul-Dec)
    Quarter 1 (Jan-Mar)
    Quarter 2 (Apr-Jun)
    Quarter 3 (Jul-Sep)
    Quarter 4 (Oct-Dec)
    How this can be created. Any help appriciated. Thanks.

    Hi Pratima,
    Can you please see below link and code snippet for how to
     format date in gridview.
    http://www.aspdotnet-suresh.com/2011/05/how-to-set-date-format-in-gridview.html
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title>Gridvew Date format</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:GridView runat="server" ID="gvdetails" DataSourceID="dsdetails" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false">
    <RowStyle BackColor="#EFF3FB" />
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <AlternatingRowStyle BackColor="White" />
    <Columns>
    <asp:BoundField DataField="Date1" HeaderText="Date1" HtmlEncode="false" DataFormatString="{0:s}" />
    <asp:BoundField DataField="Date2" HeaderText="Date2" HtmlEncode="false" DataFormatString="{0:D}" />
    <asp:BoundField DataField="Date3" HeaderText="Date3" HtmlEncode="false" DataFormatString="{0:m}" />
    <asp:BoundField DataField="Date4" HeaderText="Date4" HtmlEncode="false" DataFormatString="{0:d}" />
    <asp:BoundField DataField="Total" HeaderText="Total" HtmlEncode="false" DataFormatString="{0:C2}" />
    </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="dsdetails" runat="server" SelectCommand="select * from DateFormat" ConnectionString="<%$ConnectionStrings:dbconnection %>"></asp:SqlDataSource>
    </div>
    </form>
    </body>
    </html>
    Hope this will help you.
    Regards
    Soni K

  • How to create new XML file using retreived XML content by using SAX API?

    hi all,
    * How to create new XML file using retreived XML content by using SAX ?
    * I have tried my level best, but output is coming invalid format, my code is follows,
    XMLFileParser.java class :-
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.XMLFilterImpl;
    public class PdfParser extends XMLFilterImpl {
        private TransformerHandler handler;
        Document meta_data;
        private StringWriter meta_data_text = new StringWriter();
        public void startDocument() throws SAXException {
        void startValidation() throws SAXException {
            StreamResult streamResult = new StreamResult(meta_data_text);
            SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try
                handler = factory.newTransformerHandler();
                Transformer transformer = handler.getTransformer();
                transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                handler.setResult(streamResult);
                handler.startDocument();
            catch (TransformerConfigurationException tce)
                System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
            super.startDocument();
        public void startElement(String namespaceURI, String localName,
                String qualifiedName, Attributes atts) throws SAXException {
            handler.startElement(namespaceURI, localName, qualifiedName, atts);
            super.startElement(namespaceURI, localName, qualifiedName, atts);
        public void characters(char[] text, int start, int length)
                throws SAXException {
            handler.characters(text, start, length);
            super.characters(text, start, length);
        public void endElement(String namespaceURI, String localName,
                String qualifiedName) throws SAXException {
            super.endElement("", localName, qualifiedName);
            handler.endElement("", localName, qualifiedName);
        public void endDocument() throws SAXException {
        void endValidation() throws SAXException {
            handler.endDocument();
            try {
                TransformerFactory transfactory = TransformerFactory.newInstance();
                Transformer trans = transfactory.newTransformer();
                SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
                DOMResult dom_result = new DOMResult();
                trans.transform(sax_source, dom_result);
                meta_data = (Document) dom_result.getNode();
                System.out.println(meta_data_text);
            catch (TransformerConfigurationException tce) {
                System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
            catch (TransformerException te) {
                System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
    } CreateXMLFile.java class :-
    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();
    Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
    class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
    * In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
    is not an XML type text, it just an Normal text Why that ?
    * Please help me what is the problem in my code?
    Cheers,
    JavaImran

    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    </code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
    <code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();     
    * I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
    * I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
    Thanks,
    JavaImran{code}

Maybe you are looking for

  • Tolerance Limits with Date and quantity

    Hi Experts, We would like to set the GR Tolerance Limits with Date and qty. how to set the Tolerance Limits for Date and quantity..?? if we created PO 100qty and date 01-05-009. if we receive the goods on 20-04-2009 and 50qty... For GR .. Migo should

  • Images no longer in LR after last import - Yikes!

    I have been using LR for about 6 months now and have a considerable number of images. Today I went to bring up some images in the Library module, but the only images showing are from my most recent import! In the Library panel, under All Images, the

  • ADF BC Web Service - authenticate with JSESSIONID

    Hi! I create ADF Fusion Application Web project. I add a jspx page to ViewController project called "welcome.jspx" and secure Application with HTTP Basic authentication. Now in ViewController page I add POJO class and create webservice from it. Now I

  • CS3:Is it possible ...

    Hi, I know it's not a good idea adding a new menu item under Adobe's File menu by a plugin, but I was asked today and I wonder if someone has know about any restriction/possibility of this? Thank you, Mor

  • I am unable to update my iPad or iPhone.

    I am unable to update my iPad or iPhone. Message keeps popping up that paypal is not supported on this device. Please update your account information. I have updated my account and it continues to give me the same message. Please help