Modify XML string of a view before output

Hi!
I'm still working in the view IUICMD/CreatePerson, when you're in the CreatePerson.htm, you will found  
DATA lv_xml TYPE string.
  lv_xml = controller->configuration_descr->get_config_data( ).
In the string I can se all the layout for my view, is there method to work around with this string to change the properties of the atributes so I can change the layout dinamically?
Reward points will be granted for useful answers!
Thanks N' Best Regards
Luís
Edited by: Luis pérez on May 7, 2008 9:25 AM

Hello Luis,
The XML string is the result of the View Configuration you made yourself
In the BSP WD Component Workbench (BSP_WD_CMPWB) you can find for each view of that component a tab called 'Configuration' where you can modify
- what fields are visible on that page (add/remove fields)
- how the fields are ordered on the field
- how the fields look like (display length, ...)
The results of that configuration is stored as XML in the system and called in the view (.htm) by the code you mentioned (lv_xml = controller->configuration_descr->get_config_data( ).) So if you want to change the layout of that specific view, just open the configuration tab of that view!
If you still want more flexibility you can totally disable that line of code and program everything yourself in the view with either <htmlb> <crm_bsp_ic> or one of the other (or a combination of) BSP tags, like it was in CRM 5.0. SAP still uses that way of programming for some components, maybe take a look at them, then you'll see what I mean. (Open component BT126H_MAIL in the BSP_WD_CMPWB; then double click on the 'send_screen' view and open the 'send_screen.htm' in the right pane by double clicking on it, here you see that no XML is used, instead all visible components are coded using HTML and SAP tags)
If you're not used to program in BOL / HTMLB I strongly suggest to use the SAP 'Configuration' XML mechanism. It saves you a huge amount of coding (and time)!
Hope this makes things clear!
Reward points if useful!
Regards,
Joost

Similar Messages

  • How to create XML string for an object matching the result of a marshal?

    I'm trying to create a XML string representation of an object which exactly matches the XML which results from marshalling the object into a request. I'm almost there except that the XML string I come up with is missing the attribute "standalone=\"yes\"" in the topmost xml element, and this attribute is present in the marshalled XML. I'm using the XML string to create a payload signature which must match exactly with the XML payload of the request, so the two XML representations of the object really do need to be identical.
    Here's what I'm doing to create the XML from the object:
       private String myObjectToXmlString (final MyObject myObject)
           throws Exception {
                 try {
               DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
               Document document = documentBuilder.newDocument();
               myObjectMarshaller.marshal(myObject, document);
               Source source = new DOMSource(document);
               StringWriter stringWriter = new StringWriter();
               Result result = new StreamResult(stringWriter);
               TransformerFactory factory = TransformerFactory.newInstance();
               Transformer transformer = factory.newTransformer();
               transformer.transform(source, result);
               return stringWriter.getBuffer().toString();
           } catch (Exception ex) {
               throw new Exception("Unable to convert a MyObject object to an XML String -- " + ex.toString(), ex);
       }The XML which is produced looks like this:
    <?xml version=\"1.0\" encoding=\"UTF-8\"?>
    <ns2:myObject xmlns:ns2=\"http://sunconnection.sun.com/xml\">
       <myObjectId>0</myObjectId>
       <objectType>1</objectType>
       <description>Test Object</description>
    </ns2:myObject>The payload object is marshalled to the request like so:
        // marshall the MyObject to the output stream
       OutputStream outputStream = myHttpUrlConnection.getOutputStream();
       myObjectMarshaller.marshal(myObject, outputStream);
       outputStream.flush();
       outputStream.close();When I view the XML payload of the request it looks like this:
    <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
    <ns2:myObject xmlns:ns2=\"http://sunconnection.sun.com/xml\">
       <myObjectId>0</myObjectId>
       <objectType>1</objectType>
       <description>Test Object</description>
    </ns2:myObject>As you can see the two XML representations of the object are identical except for the standalone attribute in the xml element.
    It'd be a hack to make the assumption that the standalone attribute will always be there in the marshalled object and to just hard code it into the XML string returned by my object to XML method. Since I'm using the same Marshaller to create the XML string as I am to perform the marshalling to the request I assume that there's some way to make it give the same XML in both cases, and that I'm doing something wrong in my method which converts the object to an XML string. If anyone can see where I'm going wrong in that method (myObjectToXmlString() above), or can suggest a better way of doing this, then I'll certainly appreciate the insight.
    --James                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    It turns out that I was taking the wrong approach in my object to XML string method. A cleaner/better way to do it, which gives the correct result, is this:
        private String myObjectToXmlString (final MyObject myObject)
            throws Exception {
            try {
                ByteArrayOutputStream stream = new ByteArrayOutputStream();
                myObjectMarshaller.marshal(myObject, stream);
                return stream.toString();
            } catch (Exception ex) {
                throw new Exception("Unable to convert a MyObject object to an XML String -- " + ex.toString(), ex);
        }--James                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • JDOM: Parsing XML String, getting error

    Hello,
    I am new to this forum, so please forgive me
    if this has already been asked before. I want to
    parse an XML string. I know the JDOM parser works
    great with a file, but apparently I have been
    unsuccessful parsing an XML String. Below is how I
    initialize the parser:
    import java.io.*; //Import proper packages
    import org.jdom.*;
    import org.jdom.input.*;
    import org.jdom.output.*;
    import java.util.*;
    import java.lang.*;
    public class XMLParser{
    private Document doc = null;
    public XMLParser(String xml){
    doc = readDocument(xml);
    private Document readDocument(String xml) {
    try {
    SAXBuilder builder = new SAXBuilder();
    org.jdom.Document result = builder.build(new
    StringReader(xml));
    return result;
    } catch(JDOMException e) {
    e.printStackTrace();
    } catch(NullPointerException e) {
    e.printStackTrace();
    return null;
    } //readDocument
    The following is the error I receive:
    JDOM/xmlparser.java [81:1] cannot resolve symbol
    symbol : method build (java.io.StringReader)
    location: class org.jdom.input.SAXBuilder
    org.jdom.Document result = builder.build(new
    StringReader(filename));
    --> Arrow pointing to builder.build
    Please if someone can help me out. If JDOM does not
    have this feature, then can someone please recommend a
    parser that can parse an XML String.

    Thank you for your help, although it seems like it was JDom 9 beta. When I tried with JDOM 8 beta, everything worked fine even with the StringReader. So if anyone is having similar problems with JDom 9 then try with JDom 8.

  • Modifying XML files with JDOM

    Hi:
    I've been trying to get up to speed with JDOM, and while it seems pretty intuitive, I've been having a problem w/ modifying XML documents.
    Namely, once I get a Document object from a (skeleton) XML file, do changes made to the Document object through, say, addContent() propagate to the original file? My gut feeling is no, although this was certainly what I had expected initially.
    Here's a code fragment of what I had tried to do to populate a barebones XML file:
                   Document doc = builder.build(output);
              // add 100 elements, all the same
              for (int count = 0; count < 100; count++)
                   Element curr = new Element("book");
                   // create child nodes for book
                   Element title = new Element("title");
                   title.addContent("Book " + (count + 1));
                   Element author = new Element("author");
                   author.addContent("Author " + (count + 1));
                   Element price = new Element("price");
                   price.addContent("Price " + (count + 1));
                   curr.addContent(title);
                   curr.addContent(author);
                   curr.addContent(price);
                   doc.getRootElement().addContent( curr );
              }

    Mikael,
    This sounds like one of the many quirks (perhaps bugs) related to how FrameMaker handles non-FM files in books. The current book model doesn't play well with XML files as chapters and this seems like yet another problem. Apparently, if an xref does not target another .fm file in the book, Frame assumes that the target file is not in the book and therefore will not be in the book PDF.
    There have been discussions here about this in the past. The solution that I use is to run an API client before publishing that converts all XML files to .fm files, and redirect all xrefs appropriately. Then, book features work as expected and PDFs come out as normal. This is not feasible, however, without the automation from the API client.
    There may be some who would say that the best approach is to use XML and books the way that the designers did account for... that is, the whole book becomes an XML document with entity references to the separate chapters. In my work, though, this model was not appropriate... rather, I needed a binary FM book to act like a book, except with XML files as chapters. So, I think I understand your situation.
    Is API programming or FrameScript an option for you? I think it may be the only way to get what you are looking for.
    Russ

  • How to modify XML to copy items

    Hi,
    i need to copy from itemcode "XX" to itemcode "YY". i save it with XML as:
    Dim oBI As SAPbobsCOM.Items
    oBI = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
    oBI.SaveXML(sFileXml)
    I need to modify XML because i must change ItemCode and then add the new item
    <ItemCode>XX</ItemCode>
    ???<ItemCode>YY</ItemCode>
    How can i do this?
    Thanks
    Valentina

    I am trying to do the exact same thing right now.  I am having moderate success with oItem.GetAsXML into a string, then using REPLACE to change the itemcode value (it exists in about 18 places, for me, because the XML gives you other stuff, like the contents of OITW).
    Then I just write my string to a temp file and bring it back in to the new object and do the add.  Here's my code:
               tempXML = System.IO.Path.GetTempFileName()
                'retrieve template item object's xml into string
                itemObjectXML = zTmpltItm.GetAsXML
                'replace the template item code with the new one
                itemObjectXML = Replace(itemObjectXML, String.Format(ItemCodeXML, zTmpltItm.ItemCode), _
                                String.Format(ItemCodeXML, zNewCode))
                'replace the template item code with the new one          
              itemObjectXML = Replace(itemObjectXML, String.Format(ItemNameXML, zTmpltItm.ItemName), _
                    String.Format(ItemNameXML, zNewName))
             'some other code...
                'save the template to disk
                sw = New System.IO.StreamWriter(tempXML, False)
                sw.WriteLine(itemObjectXML)
                sw.Close()
                'retrieve the new item's xml into a new item object for adding to the DB
                oNewItem = oCompany.GetBusinessObjectFromXML(tempXML, 0)
                'oNewItem.ItemCode = zNewCode
                'oNewItem.ItemName = zNewName
                retval = oNewItem.Add
                If retval <> 0 Then
    The one thing I wonder about is how large can the XML string end up being.  I think .net has a 32K limit, but the GetAsXML function does return a string.
    I'm doing this in 2007 and I have a problem with some of the values returned, however (like the SHGHT1Unit field).  I have a separate post for that one.
    I don't know if my way is "best practice" or even advisable, but I do have it working.
    PS: you've got to have this statement before doing the xml copying:
    oCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
    Added a PS
    Message was edited by: JC
            John Chadwick

  • XML nodes into multiple views.

    Hello everybody.
    First of all i want to say that i'm a beginner in Flex Mobile.
    I want to make an application that can read an XML file and change views through XML nodes.
    Here is an example of how it should look after reading an XML file.
    Here is the XML example. I want to read all of the nodes but only show a few of them.
    <?xml version="1.0" encoding="utf-8"?>
    <items>
         <item>
              <title>Item 1</title>
              <image>url</image>
              <description>Lorem ipsum</description>
              <subitems>
                   <subitem_title>Item 1.1</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 1.2</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 1.3</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 1.4</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 1.5</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
         </item>
         <item>
              <title>Item 2</title>
              <image>url</image>
              <description>Lorem ipsum</description>
              <subitems>
                   <subitem_title>Item 2.1</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 2.2</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 2.3</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 2.4</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 2.5</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
         </item>
         <item>
              <title>Item 3</title>
              <image>url</image>
              <description>Lorem ipsum</description>
              <subitems>
                   <subitem_title>Item 3.1</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 3.2</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 3.3</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 3.4</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 3.5</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
         </item>
         <item>
              <title>Item 4</title>
              <image>url</image>
              <description>Lorem ipsum</description>
              <subitems>
                   <subitem_title>Item 4.1</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 4.2</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 4.3</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 4.4</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
              <subitems>
                   <subitem_title>Item 4.5</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
                   <subitem_image>url</subitem_image>
              </subitems>
         </item>
    </items>
    All i could find about reading XML in a list and adding a change handler was only for 2 views, i need for 3 views and show subitems for each item. Showing subitems for each item from an XML file was very tricky and didn't worked for me.
    I could use some little help or advice!

    Follow this tutorial to learn how to get data from XML files remotelly!
         http://www.youtube.com/watch?v=Cksp7IyVNk4
    Use the XML from first post on this topic, but, at every <item></item> add an <id> field like this (make sure every item has an unique id):
    <items>
         <item>
              <id>0</id>
              <title>Item 1</title>
              <image>url</image>
              <description>Lorem ipsum</description>
              <subitems>
                   <subitem_title>Item 1.1</subitem_name>
                   <subitem_description>Lorem ipsum</subitem_description>
    Then, create 3 views (New->MXML Component)!
    List.mxml - SubList.mxml - Details.xml
    After you create them go to List.mxml create a list and import you're XML (follow tutorial before, to know how to do this).
    After you import you're XML file and show it in that list, you have to create a change handler for that list (when an item is selected we whant to change view).
    And, of course, follow Duane's tutorial to know how to do that. You will want to change view to SubList.mxml. In this view you'll have a list of childs for primary node (item node).
    Then,go to SubList.xml and create a list.
    Then, the tricky part here is that you need to drag/drop same getData():XML_data() that u used in first list. A popup window will show. Here u have to let "New service call" checked and at "Data provider" u have to select de subitem node of the XML file. And, of course, u'll have to select you're Label field.
    When u done this, go to code viewer and find the <s:AsyncListView.... code line.
    u'll have to add an .[id]. there like this:
    <s:AsyncListView list="{getDataResult2.lastResult[id].subitem}"/>
    In this way, you're list will show only entries from XML file with ITEM ID = ?!
    Then follow Duane's tutorial again.
    PS: in views u'll have to add some [Bindable] vars and a function for that view to recognize the id.
    Here's a model!
    <fx:Script>
            <![CDATA[
                        import valueObjects.XML_FIELD_type;
                        [Bindable] var id:String;
                        private function init():void
                    var thisID:XML_FIELD_type = data as XML_FIELD_type
                    id = thisID.id;
              ]]>
        </fx:Script>
    After u did this u'll have to add a viewActivate to <s:View> declaration like this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:XML_FILE_OR_FIELD="services.XML_FILE_OR_FIELD.*"
            title="Title"
            viewActivate="init()"
            cachePolicy="on"
            destructionPolicy="never">
    XML_FILE_OR_FIELD is generated automatically.
    All of these things u'll find on Duane's tutorial except the 3 view part and parsing that data. Follow it and u will solve you're problem!
    Hope it helped!
    Cheers,
    Daniel

  • Customized strings in iPad viewer not working?

    Hello,
    per request of client i've tried to change one string in viewer for iPad. So i've created template in DSP App Builder, modified this template on my computer, choose this file in App Builder and prepared another build (V28). Unfortunately, i still see old original string (i've double tested that i'm downloading new version of app). When i now check DPS App Builder, it just says "Asset stored on server", so i asume, that everything goes smoothly on this side.
    Any similar experience with customized strings?
    Thanks
    Martin

    Everything was done from scratch with V28.
    1. 10. 2013 v 16:14, Bob Bringhurst <[email protected]>:
    Re: Customized strings in iPad viewer not working?
    created by Bob Bringhurst in Digital Publishing Suite - View the full discussion
    That's odd. It worked for me when I tested it. Perhaps you should try moving the current xml file to a different folder, downloading a new version, copying and pasting, and rebuilding.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5728130#5728130
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5728130#5728130
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5728130#5728130. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Digital Publishing Suite at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • The "write key" configurat​ion file vi use of "trim string" prior to writing the data can modify any string data written.

    I tried to use the config VIs to record some front-panel settings for later restoration, one of which could be a single space character (part of a string parsing system).
    I soon discovered that whenever I tried to save that single-space value to an INI file, only a null string was saved.
    After doing some digging I discovered that buried in the Write Key vi is a worker vi called Config Data Modify that uses Trim String on the string data before it is written to the file and that's what was eating my string character. I don't know whether this is a bug or a feature but there are at least three ways to fix it.
    1) Assuming you want to leave the library VIs alone, you can pre-process any stings sent to "write key" to replace all spaces with "\20" and then post-process all strings read using "read key" to replace all instances of \20 with spaces.
      and if you don't mind modifying the library VIs, either to save/use under a different name or to stick back into the library in a modified state (caution - can cause problems when you move code to another machine with an un-modified library) then...
    2) You can yank the trim-string out of the Config Data Modify vi and hope that it does not have any undesirable side effects with regards to the other routines that use Config Data Modify (so far I have not found any in my limited testing)
    or
    3)  You can modify the string pre-processing vi, Remove Unprintable Chars, to add the space character to the list of characters that get swapped out automatically.
    Note that both option #1 (as suggested above) and option #3 will produce an INI file data entry that looks like    key="\20Hello\20World\20"   while option #2 produces an entry that looks like   key=" Hello World "
    The attached PDF contains screenshots of all this.
    Attachments:
    Binder1.pdf ‏2507 KB

    Hi Warren,
    there's a 4th option:
    Simply set the "write raw string" input of the write key function to TRUE
    This option only appears when a string is wired to that function!
    Just re-checked:
    I think it's a limitation of the config file format. It's text based and (leading) spaces in the value are "overseen" as whitespaces. So your next option would be to use quotes around your string with spaces...
    Message Edited by GerdW on 05-02-2009 08:32 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Scheduling a Report from outside Scheduler but viewing the output in Plus

    We are using Discoverer 10.1.2
    I know that we can schedule a report within Discoverer Plus and the resulting out put can be seen in Discoverer under scheduled work books
    I am also aware that we put Discoverer command line commands in a DOS script and then schedule that script to run using an Enterprise scheduler and automatically export that report Excel.
    What I want is to schedule reports using our enterprise scheduler but view the resulting output in Discoverer under scheulded work books
    I was thinking that when we schedule a report Discoverer creates a package, something like EUL5_BATCH_PACKAGE080314170249.RUN;.
    Once that package is created, if I copy it and rename it and then schedule to run from our enterprise scheduler, would I be able to view the output from Discoverer ?
    ----- Added on 03/15/2008-------
    I did try running the above package EUL5_BATCH_PACKAGE080314170249.RUN from SQL Plus as I had indicated above. The settings on the report schedule were -
    - Run immediately
    - Never repeate
    - Delete the results after 9999 days ( maximum allowed )
    Now the first time the report ran automatically using DBMS_JOBS since I had set the report to run immediately.
    After that when I tried running EUL5_BATCH_PACKAGE080314170249.RUN from SQL Plus, the procedure completed but when I looked at the Discoverer front end, it indicated the run was in error with Unique constraint violation on EUL5_BQ_TABLES.EUL5_BQT_UK_1 index. However when I looked at the table it did not have any data in it.
    I the ran the procedure again from SQL Plus and this time it completed and when I looked at the Discoverer Plus front end, the results were ready for me to view.
    When I tried running the procedure again, it failed again with unique constraint violation and when the procedure was executed after that it again ran and i was able to view the results.
    So, ever alternate run from SQL Plus was successful. I would continue to try out different combinations of schedule parameters to see if I can get it to work.
    However, any one has already tried this before please let me know if what I am trying Is this possible ?
    Any help would be appreciated
    Thank you
    Message was edited by:
    manav_purohit
    Message was edited by:
    manav_purohit

    Thanks for the suggestion Rod. However, if I use DBMS_JOB.CHANGE, the report will still run using DBMS_JOB. What I would prefer is to not use DBMS_JOB.
    Running anything in DBMS_JOB means, the job is not visible in the enterprise scheduler that we use. Our enterprise scheduler is being monitored at a data center and if any jobs fail, appropriate on call individuals are contacted. Records are kept of failures and root cause is analyzed. So I want to take advantage of these procedures for scheduled reports as well.
    I am still looking for some alternative method.

  • Performance problem submitting big XML string parameter to the web service

    We deployed a web service on the OC4J via oracle.j2ee.ws.StatelessJavaRpcWebService . This web service takes one string as a parameter. The string contains XML. Evrything works great UNLESS input XML string reaches 5Mb in size. When it happens OC4J does something with it for about 10 minutes (yes, minutes) before it calls the web service method. At this time java.exe consumes 100% of CPU.
    WE tried to increase JVM heap size, stack size, etc, - no effect.
    Please, help!
    Thank you in advance,
    Vlad.

    Hi Sheldon,
    What i feel is that it's not been handled in your webservice if the parameter is null or "" <blank> space
    i just you to take care in webservice that if the parameter is null or "" pass the parameter null to the stored proc
    Regards
    Pavan

  • How to Get Most Current User View Before Checking In.

    Hi,
    We have several custom workflows which users can start from end-user menu and have some resource accounts created/modified after approvals.
    User view is checked out once at the beginning of each workflow, then some user attributes are modified through forms and user view is checked in with new attributes at the end.
    If any user starts a workflow (say W2) before completion of another workflow (say W1) he started before, and W1 is completed when W2 is waiting for approvals or etc., W2 completely discards changes made to user view through W1 since it has already checked out the user view before.
    If I checkout the user once more just before checkin, I'm able to get a current user view but this time changes made through forms used in the current workflow are lost.
    What's the best way, to get an updated user view of the user without overwriting any changes made out of the running workflow and losing form data?
    Regards,
    Mehtap.

    In a situation like this, you should probably change the front end to store the changes in workflow variables instead of using the view directly. Then, post approval, you checkout the view and apply the changes. I've used this approach to perform changes on large numbers of users (kind of like a bulk action, only more reliable).
    Alternatively, you can checkout the user object at the beginning of the workflow, and this will prevent your race condition by putting a lock on it. This will obviously cause problems (for you) if your users expect to be able to do multiple changes simultaneously. Don't try this approach if an angry mob will storm your cubicle -- IDM coders are hard to come by.
    Jason

  • How to get XMP MetaData as an XML String in a process?

    Hi there,
    I have a process where I would like to export a documents XMP MetaData, manipulate the XMP MetaData and then import the MetaData again to the document.
    I thougt first I will use the service Name "XMPUtilityService" with the Service Operation "Export XMP" to export the XMP MetaData as a document.
    Hoewer I am not sure how to manipulate the output document from the Export XMP service.
    When I print out the document.toString() in a execute Script Service I get the following:
    <document state="active" senderVersion="0" persistent="false" senderPersistent="false" passivated="false" senderPassivated="false" deserialized="false" senderHostId="null" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="3440" contentType="null" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGl obalBackendId/><inline><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="A...</inline><senderPullServantJndiName/><attributes/></document>
    Actually I expected something like this:
    <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-jc006 DEBUG-1.0, 2009 Jun 23 11:07:21-PDT">
       <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
          <rdf:Description rdf:about=""
                xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
             <pdf:Producer>Adobe LiveCycle PDF Generator ES2</pdf:Producer>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmp="http://ns.adobe.com/xap/1.0/">
             <xmp:ModifyDate>2010-04-20T20:43:59+02:00</xmp:ModifyDate>
             <xmp:MetadataDate>2010-04-20T20:43:59+02:00</xmp:MetadataDate>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
             <xmpMM:DocumentID>uuid:0cf2c6c6-2fba-2b39-5fb6-33ad8ccf58aa</xmpMM:DocumentID>
             <xmpMM:InstanceID>uuid:187bc5a2-acb0-2fa9-711d-33ad8ccf58aa</xmpMM:InstanceID>
          </rdf:Description>
       </rdf:RDF>
    </x:xmpmeta>
    <?xpacket end="w"?>
    What do I need to do to get the XMPMeta data as an XML String from a document within a process?
    Thanks in advance!
    Paul

    Hi,
    thanks for the answer.
    I know that I can retrieve the XMPUtilityMetadata object, but this object provides only access to a few information suche as creator, subject, producer, etc.
    However I would like to retrieve the whole XML String of the XMP Metadata.
    How is this possible?
    Thanks.
    Paul

  • XML string to XML parsing in JCD

    I have stored an XML file as a CLOB in the Oracle DB. While fetching this data into JCD using Oracle OTD, I am getting this CLOB field as a string containing the XML. Now I want to parse this XML string to XML, as I need to map the individual fields to an XSD OTD, which will be my output.
    Kindly suggest a way to achieve this.

    An XSD OTD has an unmarshalFromString() method:
    inputFormat.unmarshalFromString( strData );
    When putting the XML into the CLOB it could be a good idea to wrap an outputstream into a Writer object in order to make certain that the encoding is correct, depending how the data is represented. When retrieving CLOB data using getCharacterStream() you will get a Reader object where the encoding is already given.

  • How to retreive the modified XML data?

    Hi..
    i had a problem in retrieving the modified xml data.
    Iam using apache's DOMParser
    In the my class my xml data is stored in a string.so i used following statement to read xml data from that string:
    String abc="<? xml version=... some data goes here"
    InputSource in=new InputSource(new ByteArrayInputStream(abc.getBytes()));
              DOMParser domParser = new DOMParser();
              domParser.parse(in);
              Document doc = domParser.getDocument();
              Element root = doc.getDocumentElement();
    and i did some operations like adding ,removing and replacing elements etc.
    It was fine when the checked the data.
    but..i need my modified xml data as String.
    is there any method to retrieve the modified xml data "as it is" in String?

    You can use XMLSerializer.
    Here is an example that dump your document on the console:
    OutputFormat formatter = new OutputFormat();
    formatter.setPreserveSpace(true);
    XMLSerializer serializer =
    new XMLSerializer(System.out, formatter);
    serializer.serialize(doc);
    where doc is your Document.

  • How to Parse an XML string

    I need some help to parse an XML String instead of an XML file. The string can be like.
    String myRecords =
    "<data>"+
    " <employee>"+
    " <name>John</name>"+
    " <Designation>Manager</Designation>"+
    " </employee>"+
    " <employee>"+
    " <name>Sara</name>"+
    " <Designation>Clerk</Designation>"+
    " </employee>"+
    "<data>"+

    I tried it in a servlet, it and it worked. The entire code is long. But here it is most of it:
    assuming that x is a string and has the xml of
    <?xml version="1.0" ?>
    - <company>
    - <employee>
    <firstname>Tom</firstname>
    <lastname>Cat</lastname>
    </employee>
    - <employee>
    <firstname>Paul</firstname>
    <lastname>Enderson</lastname>
    </employee>
    - <employee>
    <firstname>George</firstname>
    <lastname>Jungle</lastname>
    </employee>
    </company>
    =========================
    try {
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    DocumentBuilder db = factory.newDocumentBuilder();
    InputSource inStream = new InputSource();
    inStream.setCharacterStream(new StringReader(*x*));
    Document doc = db.parse(inStream);
    doc.getDocumentElement().normalize();
    out.println("Root element " + doc.getDocumentElement().getNodeName() + "<BR>");
    NodeList nodeLst = doc.getElementsByTagName("employee");
    out.println("Information of all employees<BR>");
    for (int s = 0; s < nodeLst.getLength(); s++) {
    Node fstNode = nodeLst.item(s);
    if (fstNode.getNodeType() == Node.ELEMENT_NODE) {
    Element fstElmnt = (Element) fstNode;
    NodeList fstNmElmntLst = fstElmnt.getElementsByTagName("firstname");
    Element fstNmElmnt = (Element) fstNmElmntLst.item(0);
    NodeList fstNm = fstNmElmnt.getChildNodes();
    out.println("First Name : " + ((Node) fstNm.item(0)).getNodeValue() + "<BR>");
    NodeList lstNmElmntLst = fstElmnt.getElementsByTagName("lastname");
    Element lstNmElmnt = (Element) lstNmElmntLst.item(0);
    NodeList lstNm = lstNmElmnt.getChildNodes();
    out.println("Last Name : " + ((Node) lstNm.item(0)).getNodeValue() + "<BR>");
    } catch (Exception e) {
    System.out.println(e);
    out.close();
    ==============
    The output is
    Root element company
    Information of all employees
    First Name : Tom
    Last Name : Cat
    First Name : Paul
    Last Name : Enderson
    First Name : George
    Last Name : Jungle

Maybe you are looking for

  • Adobe photoshop elements 10 installation probs. error 1311

    Help I just purchased adobe photoshop elements 10 and I can't get it to install; I keep getting error code 1311, source file not found g:\adobe photoshop elements 10\data1.cab. verify that file exists and that you can access it. I've looked up the tr

  • Asain writing on top of page

    Lately, at the top and across the tabs of each page there is Asian (ex- Japanese, not sure which) writing that appears. The tabs become blank. The writing also shows up in the toolbar line. This has started the last couple weeks I believe.

  • SQL Server 2005 Analysis Services across domains

    Hi, With SQL Server 2000, the Enterprise Edition was required to access Analysis Services across domains. Is this also the case in SQL Server 2005, that the Enterprise Edition is needed? Thanks, S

  • Integration of ALE and SAP XI

    Hi All I am working on a project that uses SAP XI as middleware. XI reads flat files , converts them  into idocs and posts them to SAP system. The inbound functions are designed to handle one idoc at a time whereas SAP XI is sending all idocs created

  • Bank of America app no longer works.

    My BofA app stopped working recently. Anybody know what's wrong? Thanks, DW Solved! Go to Solution.