Is it possible to get entire XML body in UDF?

Hi to all!
Is it possible to get entire XML body in UDF in XI ?

Hi,
Check out this thread for some idea..
Re: How to dump the complete MainDocument to a CLOB field?
Re: NullPointerException when retrieving empty clob from database
Regards
Aashish Sinha
PS : reward points if helpful

Similar Messages

  • How to generate the User-Input XML Body for executing workflows via REST APIs: The Solution

    I see that executing a workflow via REST APIs requires lot of work to be done just to prepare the right User-input XML body. Any mistake and you have some major debugging to do. Larger the number of User-Inputs, the bigger is the problem.Life is so much easier at the WFA GUI with Display names and tooltip help for User Inputs which are very easy for reading and providing the right values. I don't have any such privileges when manually preparing the User-Input XML body.It’s been asked numerous times how to provide User-Input values for type table, or Query (Multi-Select) etc. These are complex User-Input types and has lots of scope for user mistakes.I can have User-input dependency at WFA GUI which allows me to make the right selection, but while preparing my XML body I need to take care of it myself.An operator is allowed to execute workflows, but the same Display names which help him make the right user-inputs, makes it impossible for him to prepare the user-input body xml. Display names can't be used in in XML body and he can't know the exact parameter names by looking at the Display names. So he need to always contact the Admins/Architects for this. And Architects/Admins can't be expected to keep providing User-Input XML body to operators every operator. How about if I could enter all the User-Input values in my workflow execution at WFA GUI, I can do a preview which passed to my satisfaction and then I can magically get the XML body for it which I can use to execute my workflow from REST APIs from any client. It could be so very much easy for me than building my User-Input XML body manually. This is exactly what I'm going to give you right now. You open the WFA in browser, Go to your workflow, Start execution, you input values from GUI reading carefully the display names, preview it to your satisfaction and then get the XML body. Assume your workflow is called “Workflow to Print a given Message”. It’s a simple workflow with only 1 user-input Displayed as "Message to Print" Prerequisites:  The following are the one-time prerequisites. You need PowerShell 3.0 on your WFA server.Import the attached Generate_Workflow_User_Input_Body_in_XML.dar in your WFA. It’s our magical command called "Generate Workflow User Input Body in XML"Add credentials of a WFA Admin/Architect in you WFA itself with Name/IP: localhostMatch: ExactType: OtherName/IP: localhostUsername: <WFA Admin/Architect Username>Password: <User Password>   Steps: Suppose you have a workflow called "Workflow to Print a given Message". You want to execute it from REST apis and need to prepare the user input XML body.  Select this workflow and clone it. The workflow clone is the exact copy of your original workflow word by word, input-by-input. It will open in Edit mode with name "Workflow to Print a given Message - copy".Add the command "Generate Workflow User Input Body in XML" at the beginning of your workflow. This is a must. This command need to be the first command in your cloned workflow.This command requires no input. So for its Parameters just press okay and save the workflow.You are done.Now Execute the clone workflow. You'll see all the user-inputs available to you. Make your choices as you wish. Preview it to confirm that planning is passed and u have no errors.Execute it now.You'll see that the our magical command "Generate Workflow User Input Body in XML" has failed in our clone workflow execution. Don't worry, its fate was decided to be so. But it didn't fail before giving me what I really wanted. i.e. my XML body for my real workflow. It displayed it in the GUI as well as saved it in your WFA server @ C:\temp\<workflow_name_dd_MM_yyyy_hh_mm_ss_.xmlIt also deleted all the reservations of this particular failed job. So NO major residue left to be cleaned.To summarize: Clone Your workflow and Add the command "Generate Workflow User Input Body in XML" as your first command.    Start Execution, provide your User-inputs and preview it. Be satisfied and Press Okay.   Now Execute it.  After a few scconds this cloned workflow will fail with Error "All done. The Workflow will fail now."     See the command execution logs for this command. You'll see the User-Input XML body. It has also saved the XML file at C:\temp in your WFA server.   Have fun. sinhaa  

    Providing a new version 1.1.0 of the command "WFA Schedular" Changes made: Added conditional String Representation based on the Scheduling parameter provided. Provided check for the right number of parameters passed into the command.Added a new parameter "Expiry Date" to automatically stop the recurring execution upon expiry.Check for Posh3.0 version in code.Have Fun!! sinhaa Below example for:Schedule a workflow for recurring execution every alternate day i.e. once in 2 days at 10:30 PM starting 06-Jul-2015 (Today's date is 02-Jul-2015) . The recurring workflow execution  should expire on 31-Dec-2015 and stop.  

  • XML DB: is it possible to get a row for each element in a container element?

    I have an XML document containing a container element (collection). If I query, using an XPath expression, the contained elements I get a row for each container element with the contained element concatenated. Is it possible to get a row for each contained element?
    I run this simple query:
    select extract(xmltype('<colors><color>Red</color><color>Green</color></colors>')
    , '/colors/color/text()').getstringval() from dual
    And get this result:
    EXTRACT(XMLTYPE('<COLORS><COLOR>RED</COLOR><COLOR>GREEN</COLOR></COLORS>'),'/COL
    RedGreen
    1 row selected.
    What I would like to have is:
    Red
    Green
    2 rows selected.
    Wishful thinking or possible? Many thanks!

    Sure. This is where our XMLSequence() function comes in. It allows you to treat the top-level nodes in a nodeset as if they were rows in a table when combined with the TABLE() operator. Here's an example.
    First, to make the SQL look a little cleaner, I like to define a function like this:
    create or replace function testdoc return xmltype as
    begin
      return xmltype('<colors><color>Red</color><color>Green</color></colors>');
    end;.
    To break out the nodeset of <color> elements as a table, we use the following query:
    select value(list_of_color_elements).extract('*/text()').getStringVal() as color
    from TABLE( XMLSequence( extract(testdoc(),'/colors/color'))) list_of_color_elements.
    Or, using the new-in-9.2 extractValue() operator so we don't have to remember the text() part:
    select extractValue( value(list_of_color_elements), '.') as color
    from TABLE( XMLSequence( extract( testdoc() ,'/colors/color'))) list_of_color_elements.
    Here the TABLE(XMLSequence(...)) combo produces a table of XMLType, with one XMLType object in each row of the table.
    In general, if the XMLType instance were coming from an XMLType table xmltab the query would look like this:
    select extractValue( value(colors), '.') as color
    from xmltab x, /* Important that this table comes earlier in the FROM clause! */
         TABLE( XMLSequence( extract( value(x),'/colors/color'))) colors.
    And if the XMLType were instead in a column of XMLType named doc in a table xmltab, then we would have the syntax:
    select extractValue( value(colors), '.') as color
    from xmltab x, /* Important that this table comes earlier in the FROM clause! */
         TABLE( XMLSequence( extract( x.doc ,'/colors/color'))) colorsOnce you get the hang of it, you'll see that the combination of TABLE(XMLSequence()) to "shred" XML nodes into rows, and XMLAgg() to aggregate fragments of XML across multiple rows back into a single document, is quite powerful.

  • A web service that returns a xml file and gets another xml file as input?

    Hi,
    I want to create a web service which gets an xml document as input then returns again an xml document.How can I create this kind of web service?
    Is this kind of implementation is possible?
    public Document mywebservice(Document input){
    Document d;
    return d;
    or do I have to use serialization processes which I don't know very much.
    I am waiting for your help.Thank you...

    If you want to deal directly with the Document and not want the SOAP engine to serialize/deserialize the XML into Java objects, then you can easliy implement this using Axis. Look at the Axis documentation (http://ws.apache.org/axis/java/user-guide.html#ServiceStylesRPCDocumentWrappedAndMessage) under the heading "Message Services". One of the provided API methods that Axis provides is in the form you want: public Document method(Document body). Hope that helps. As for how to implement the service using Axis, that is beyond the scope of this forum. Check the Axis docs for more help on that.

  • Is it possible to get a mac virus?

    Hey,
    I was using a pc and I decided to get a mac, because you can do lots of creative work with it and I was sick of viruses. I was able to clean my pc up after I had a virus and I know how to reprogram it. And I still don't know why I always had a computer virus, because I had a fire wall/anti virus programs and surfed on safe intenet sites.
    Now, after buying a mac book I never feel safe, because I was used to have computer viruses
    Is it possible to get one on my mac?
    (I never download any suspicious stuff from the internet ex.:songs, videos etc I only use my mac for my writing at university, editing pictures and making music)
    Thank you

    1. This comment applies to malicious software ("malware") that's installed unwittingly by the victim of a network attack. It does not apply to software, such as keystroke loggers, that may be installed deliberately by an intruder who has hands-on access to the victim's computer. That threat is in a different category, and there's no easy way to defend against it. If you have reason to suspect that you're the target of such an attack, you need expert help.
    2. All versions of OS X since 10.6.7 have been able to detect known Mac malware in downloaded files, and to block insecure web plugins. This feature is transparent to the user, but internally Apple calls it "XProtect." The malware recognition database is automatically checked for updates once a day; however, you shouldn't rely on it, because the attackers are always at least a day ahead of the defenders.
    The following caveats apply to XProtect:
    It can be bypassed by some third-party networking software, such as BitTorrent clients and Java applets (see below.)
    It only applies to software downloaded from the network. Software installed from a CD or other media is not checked.
    3. Starting with OS X 10.7.5, there has been another layer of built-in malware protection, designated "Gatekeeper" by Apple. By default, applications and Installer packages downloaded from the network will only run if they're digitally signed by a developer with a certificate issued by Apple. Software certified in this way hasn't actually been tested by Apple (unless it comes from the Mac App Store), but you can be reasonably sure that it hasn't been modified by anyone other than the developer. His identity is known to Apple, so he could be held legally responsible if he distributed malware. For most practical purposes, applications recognized by Gatekeeper as signed can be considered safe.
    Gatekeeper doesn't depend on a database of known malware. It has, however, the same limitations as XProtect, and in addition the following:
    It can easily be disabled or overridden by the user.
    A malware attacker could get control of a code-signing certificate under false pretenses, or could find some other way to evade Apple's controls.
    For more information about Gatekeeper, see this Apple Support article.
    4. Beyond XProtect and Gatekeeper, there’s no benefit, in most cases, from any other automated protection against malware. The first and best line of defense is always your own intelligence. All known malware circulating on the Internet that affects a fully-updated installation of OS X 10.6 or later takes the form of so-called "trojan horses," which can only have an effect if the victim is duped into running them. The threat therefore amounts to a battle of wits between you and the malware attacker. If you're smarter than he thinks you are, you'll win.
    That means, in practice, that you never use software that comes from an untrustworthy source. How do you know whether a source is trustworthy?
    Any website that prompts you to install a “codec,” “plug-in,” "player," "extractor," or “certificate” that comes from that same site, or an unknown one, is untrustworthy.
    A web operator who tells you that you have a “virus,” or that anything else is wrong with your computer, or that you have won a prize in a contest you never entered, is trying to commit a crime with you as the victim. (Some reputable websites did legitimately warn visitors who were infected with the "DNSChanger" malware. That exception to this rule no longer applies.)
    Pirated copies or "cracks" of commercial software, no matter where they come from, are unsafe.
    Software of any kind downloaded from a BitTorrent or from a Usenet binary newsgroup is unsafe.
    Software with a corporate brand, such as Adobe Flash Player, must be downloaded directly from the developer’s website. If it comes from any other source, it's unsafe.
    5. Java on the Web (not to be confused with JavaScript, to which it's not related, despite the similarity of the names) is a weak point in the security of any system. Java is, among other things, a platform for running complex applications in a web page, on the client. That was never a good idea, and Java's developers have had a lot of trouble implementing it without also creating a portal for malware to enter. Past Java exploits are the closest thing there has ever been to a Windows-style "virus" affecting OS X. Merely loading a page with malicious Java content could be harmful. Fortunately, Java on the Web is mostly extinct. Only a few outmoded sites still use it. Try to hasten the process of extinction by avoiding those sites, if you have a choice.
    Java is not included in OS X 10.7 and later. Discrete Java installers are distributed by Apple and by Oracle (the developer of Java.) Don't use either one unless you need it. Most people don't. If Java is installed, disable it — not JavaScript — in your browsers. In Safari, this is done by unchecking the box marked Enable Java in the Security tab of the preferences dialog.
    Regardless of version, experience has shown that Java on the Web can't be trusted. If you must use a Java applet for a specific task, enable Java only when needed for the task and disable it immediately when done. Close all other browser windows and tabs, and don't visit any other sites while Java is active. Never enable Java on a public web page that carries third-party advertising. Use it only on well-known, password-protected, secure websites without ads. In Safari 6 or later, you'll see a lock icon in the address bar with the abbreviation "https" when visiting a secure site.
    Follow these guidelines, and you’ll be practically as safe from malware as you can be.
    6. Never install any commercial "anti-virus" or "Internet security" products for the Mac, as they all do more harm than good, if they do any good at all. If you need to be able to detect Windows malware in your files, use the free software ClamXav — nothing else.
    Why shouldn't you use commercial "anti-virus" products?
    Their design is predicated on the nonexistent threat that malware may be injected at any time, anywhere in the file system. Malware is downloaded from the network; it doesn't materialize from nowhere.
    In order to meet that nonexistent threat, the software modifies or duplicates low-level functions of the operating system, which is a waste of resources and a common cause of instability, bugs, and poor performance.
    By modifying the operating system, the software itself may create weaknesses that could be exploited by malware attackers.
    7. ClamXav doesn't have these drawbacks. That doesn't mean it's entirely safe. It may report email messages that have "phishing" links in the body, or Windows malware in attachments, as infected files, and offer to delete or move them. Doing so will corrupt the Mail database. The messages should be deleted from within the Mail application.
    ClamXav is not needed, and should not be relied upon, for protection against OS X malware. It's useful only for detecting Windows malware. Windows malware can't harm you directly (unless, of course, you use Windows.) Just don't pass it on to anyone else.
    A Windows malware attachment in email is usually easy to recognize. The file name will often be targeted at people who aren't very bright; for example:
    ♥♥♥♥♥♥♥♥♥♥♥♥♥♥!!!!!!!H0TBABEZ4U!!!!!!!.AVI♥♥♥♥♥♥♥♥♥♥♥♥♥♥.exe
    ClamXav may be able to tell you which particular virus or trojan it is, but do you care? In practice, there's seldom a reason to use ClamXav unless a network administrator requires you to run an anti-virus application.
    8. The greatest harm done by anti-virus software, in my opinion, is in its effect on human behavior. It does little or nothing to protect people from emerging threats, but they get a false sense of security from it, and then they may behave in ways that expose them to higher risk. Nothing can lessen the need for safe computing practices.
    9. It seems to be a common belief that the built-in Application Firewall acts as a barrier to infection, or prevents malware from functioning. It does neither. It blocks inbound connections to certain network services you're running, such as file sharing. It's disabled by default and you should leave it that way if you're behind a router on a private home or office network. Activate it only when you're on an untrusted network, for instance a public Wi-Fi hotspot, where you don't want to provide services. Disable any services you don't use in the Sharing preference pane. All are disabled by default.

  • How to get the XML Source again from the same RDF ???

    If the one new column is added in the .rdf file, then how u create your new XML source by submitting the same cp?
    When I ran the cp for 1st time, I was able to get xml source by view output, save it, make rtf and make data defn and template creation.
    But how to get the XML source If the one new column is added in the same .rdf file?
    Thanks
    Ud.

    The simple answer is: you don't.
    Not only is it simply not possible, but the entire concept of "the active browser" doesn't exist.
    You were on the right track with your code to retrieve the page directly from the server, but as you noticed that code will only work for regular http connections.
    For https and other protocols you will need to use appropriate libraries for each protocol. Something like Apache Commons can help you with that. There are networking libraries in there for a lot of commonly used protocols.

  • Fetch entire xml structure

    Hi,
    I am looking for a way to get the entire xml structure inside an actual xml object, or if possible, as a string. I need to pass it to a service but i haven't found a way to get it in the layout that it is shown in the structure panel. The only thing i am able to do is work with XMLElments but isnt there any other way to access it?

    if its importing then you can import the xml into javascript rather than indesign then manipulate the xml before placing it in indesign.
    for example, in this case the xml is read from a file into javascript:
    var xmlFile = File.openDialog ("Please select the XML file");
    xmlFile.open("r");
                        var strXML = xmlFile.read();
      xmlFile.close();
                        XML.ignoreComments = true;
                        XML.ignoreProcessingInstructions = true;
    xmlTree =  new XML(strXML);
    var childrenXML = XMLTree.children(); // children would be directly below the root element to select individual elements use .child("elementName") there are several other options available for navigating through the nodes: including: .parent() and also descendants().
    for (i =0;i < XMLTree.children().length; i++) {
    //process the xml
    Keith

  • How can I get the XML structure from a flat structure?

    Hi all,
    in my XI SP 12 I use a JMS adapter to read information using the WebSphereMQ transport protocol.
    The structure that I receive have this format:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value>
    <NumberRecordType_B><NumberRecordType_c>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    the problem is that in this structure each line is not separated by a carriage return or a comma, I have all the information in a single line:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value><NumberRecordType_B><NumberRecordType_c><Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>...<Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value><Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>...<Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    and the customer don't want to insert a line separator.
    Then, the question is:
    How can I get the XML structure from this structure?
    If possible, I don't want to develop new Module and add it in the JMS Module Sequence.
    PS I have already read the article "How to Use the Content Conversion Module with the XI 3 J2EE JMS Adapter.pdf" and it doesn't seem to help me.
    Best Regards,
    Paolo

    To get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
    ServletContext context = getServlet().getServletContext();
    String tempContextVar =
    context.getInitParameter("<your context param >");

  • How to get an XML string from a Java Bean without wrting to a file first ?

    I know we can save a Java Bean to an XML file with XMLEncoder and then read it back with XMLDecoder.
    But how can I get an XML string of a Java Bean without writing to a file first ?
    For instance :
    My_Class A_Class = new My_Class("a",1,2,"Z", ...);
    String XML_String_Of_The_Class = an XML representation of A_Class ?
    Of course I can save it to a file with XMLEncoder, and read it in using XMLDecoder, then delete the file, I wonder if it is possible to skip all that and get the XML string directly ?
    Frank

    I think so too, but I am trying to send the object to a servlet as shown below, since I don't know how to send an object to a servlet, I can only turn it into a string and reconstruct it back to an object on the server side after receiving it :
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class Servlet_Message        // Send a message to an HTTP servlet. The protocol is a GET or POST request with a URLEncoded string holding the arguments sent as name=value pairs.
      public static int GET=0;
      public static int POST=1;
      private URL servlet;
      // the URL of the servlet to send messages to
      public Servlet_Message(URL servlet) { this.servlet=servlet; }
      public String sendMessage(Properties args) throws IOException { return sendMessage(args,POST); }
      // Send the request. Return the input stream with the response if the request succeeds.
      // @param args the arguments to send to the servlet
      // @param method GET or POST
      // @exception IOException if error sending request
      // @return the response from the servlet to this message
      public String sendMessage(Properties args,int method) throws IOException
        String Input_Line;
        StringBuffer Result_Buf=new StringBuffer();
        // Set this up any way you want -- POST can be used for all calls, but request headers
        // cannot be set in JDK 1.0.2 so the query string still must be used to pass arguments.
        if (method==GET)
          URL url=new URL(servlet.toExternalForm()+"?"+toEncodedString(args));
          BufferedReader in=new BufferedReader(new InputStreamReader(url.openStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
        else     
          URLConnection conn=servlet.openConnection();
          conn.setDoInput(true);
          conn.setDoOutput(true);           
          conn.setUseCaches(false);
          // Work around a Netscape bug
          conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
          // POST the request data (html form encoded)
          DataOutputStream out=new DataOutputStream(conn.getOutputStream());
          if (args!=null && args.size()>0)
            out.writeBytes(toEncodedString(args));
    //        System.out.println("ServletMessage args: "+args);
    //        System.out.println("ServletMessage toEncString args: "+toEncodedString(args));     
          BufferedReader in=new BufferedReader(new InputStreamReader(conn.getInputStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
          out.flush();
          out.close(); // ESSENTIAL for this to work!          
        return Result_Buf.toString();               // Read the POST response data   
      // Encode the arguments in the property set as a URL-encoded string. Multiple name=value pairs are separated by ampersands.
      // @return the URLEncoded string with name=value pairs
      public String toEncodedString(Properties args)
        StringBuffer sb=new StringBuffer();
        if (args!=null)
          String sep="";
          Enumeration names=args.propertyNames();
          while (names.hasMoreElements())
            String name=(String)names.nextElement();
            try { sb.append(sep+URLEncoder.encode(name,"UTF-8")+"="+URLEncoder.encode(args.getProperty(name),"UTF-8")); }
    //        try { sb.append(sep+URLEncoder.encode(name,"UTF-16")+"="+URLEncoder.encode(args.getProperty(name),"UTF-16")); }
            catch (UnsupportedEncodingException e) { System.out.println(e); }
            sep="&";
        return sb.toString();
    }As shown above the servlet need to encode a string.
    Now my question becomes :
    <1> Is it possible to send an object to a servlet, if so how ? And at the receiving end how to get it back to an object ?
    <2> If it can't be done, how can I be sure to encode the string in the right format to send it over to the servlet ?
    Frank

  • Is it possible to get control of the .SWF files in JSP files

    Hi All
    In my web application, I got 4 swf buttons which are created by flash and they are embedded in the jsp's. Each button perform the navigation to other page.
    this is the jsp file.
         <table width="100%" border="0">
                  <tr>
                    <td width="2%" height="26"> </td>
                    <td width="31%"> <object classid="clsid:...." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                        <param name="BASE" value=".">
                        <param name="BGCOLOR" value="">
                        <param name="movie" value="button1.swf">
                        <param name="quality" value="high">
                        <embed src="button1.swf" width="100" height="22" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" base="." ></embed>
                      </object> <font size="-1" face="Arial, Helvetica, sans-serif"> </font></td>
                    <td width="67%" class="sitemapgy">*Add*  </td>
                  </tr>
                  <tr>
                    <td height="26"> </td>
                    <td><object classid="clsid:..." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                        <param name="BASE" value=".">
                        <param name="BGCOLOR" value="">
                        <param name="movie" value="button2.swf">
                        <param name="quality" value="high">
                        <embed src="button2.swf" width="100" height="22" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" base="." ></embed>
                      </object> </td>
                    <td class="sitemapgy">*Edit* ;</td>
                  </tr>
                  <tr>
                    <td height="26"> </td>
                    <td><object classid="clsid:..." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                        <param name="movie" value="button13.swf">
                        <param name="quality" value="high">
                        <param name="base" value=".">
                        <embed src="button7.swf" base="."  quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
                      </object></td>
                    <td class="sitemapgy">*Create*</td>
                  </tr>
                  <tr>
                    <td height="26"> </td>
                    <td><object classid="clsid:.." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                        <param name="BGCOLOR" value="">
                        <param name="movie" value="main_print.swf">
                        <param name="quality" value="high">
                        <param name="base" value=".">
                        <embed src="main_print.swf" base="."  quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
                      </object></td>
                    <td class="sitemapgy"><font face="Arial, Helvetica, sans-serif">*Print*</font></td>
                  </tr>
                  <tr>
                    <td height="26"> </td>
                    <td><object classid="clsid:..." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22" >
                        <param name="BGCOLOR" value="">
                        <param name="BASE" value=".">
                        <param name="movie" value="button3.swf">
                        <param name="quality" value="high">
                        <embed src="button3.swf" width="100" height="22" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" base="." ></embed>
                      </object></td>
                    <td class="sitemapgy"><font face="Arial, Helvetica, sans-serif">*_Admin_*</font></td>
                  </tr>
                  <tr>
                    <td height="24"> </td>
                    <td> </td>
                    <td> </td>
                  </tr>
                </table>When I click the button3.swf (Admin) button....it navigates to other page...Before that I need to get control of swf button and need to perform some login checks.
    Is it possible to get control?
    Thanks

    Thanks for your responses, I tried in the same way but when ever it looking at the path "/admin/admin_main.jsp",
    its navigating to error page if the username is admin too(abcd).
    Can you please help me regarding this.
    I am sending you my code and web.xml.
                     <filter>
              <filter-name>ExampleFilter</filter-name>
              <filter-class>com.pack.db.ExampleFilter</filter-class>
         </filter>
                   <filter-mapping>
              <filter-name>ExampleFilter</filter-name>
              <url-pattern>/admin/admin_main.jsp</url-pattern>
         </filter-mapping>
    import java.io.*;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.http.*;
    public class ExampleFilter implements Filter {
         private FilterConfig filterConfig=null;
         public void init(FilterConfig config) throws ServletException {
              this.filterConfig = config;
         public void destroy() {
              filterConfig = null;
         public void doFilter(ServletRequest request, ServletResponse response,
                   FilterChain chain) throws IOException, ServletException {
              RequestDispatcher rd = null;
              String userInfo = "";
              String userName="";
              if (request instanceof HttpServletRequest) {
                   userInfo = ((HttpServletRequest) request).getUserPrincipal()
                                      .getName();
                             String[] pieces = userInfo.split("\\\\"); // Firefox sends DOMAIN\USERNAME as UserPrincipal
                                  userName = pieces[pieces.length -1]; // getting the username for which I need to perform check
                                  if(userName!="abcd"){
                                  System.out.println("userName IN ELSE PART:"+userName);
                                  System.out.println("INVALID USER NAME");
                                 rd = request.getRequestDispatcher("/admin/error.html");// i need to forward the response url to error page if the username is not equal to "abcd"
                                 rd.forward(request, response);
                             else{
                             chain.doFilter(request, response); // if username="abcd" I need to navigate to normal pages.
    Thanks

  • Does unmarshall operation hold entire XML document in memory?

    Hi,
    When the unmarshall operation is done on a large XML file, does the root element Java object returned hold the entire XML document in memory? I have a large XML file that I want to unmarshall that contains many <product> elements for example. I want use up as less memory as possible. How would I achieve this?
    Thanks.

    Yes. I am going with Stax + JAXB to unmarshall. Stax so I could iterate over each element and then use JAXB to unmarshall an element at a time. But the solution is a bit involved. I wanted to do it with just JAXB and so I want to know if JAXB holds the entire content tree in memory if I unmarshall the root element.

  • Possible to get variable name?

    Is it possible to get the name that you have used in your code of a variable?
    ie.
    procedure main_procedure
    is
       l_var varchar2(10) := 'Hello';
    begin
       dbms_output.put_line(get_var_name(l_var));
    end;
    function get_var_name(p_var in varchar2)
    return varchar2
    is
    begin
       -- insert magic here
    end;
    -- End code; Now call the procedure
    exec main_procedure;-- Needed output:
    "variable passed had name l_var and value Hello"

    Hi Sam,
    OK, this is definitely for fun only and NOT recommended for any production database!!
    With that out of the way, this has been adapted from Tom Kyte's who_called_me:
    SQL> create or replace procedure get_var_name (
      2     p_var in varchar2
      3  )
      4  as
      5     call_stack   varchar2(4096) default dbms_utility.format_call_stack;
      6     n            number;
      7     found_stack  boolean default false;
      8     l_line       varchar2(255);
      9     cnt          number := 0;
    10     l_owner      varchar2(255);
    11     l_name       varchar2(255);
    12     lineno       number;
    13     caller_t     varchar2(255);
    14     calling_line varchar2(4000);
    15     var_name     varchar2(1000);
    16  begin
    17     loop
    18        n := instr( call_stack, chr(10) );
    19        exit when ( cnt = 3 or n is null or n = 0 );
    20        l_line := substr( call_stack, 1, n-1 );
    21        call_stack := substr( call_stack, n+1 );
    22        if ( not found_stack ) then
    23           if ( l_line like '%handle%number%name%' ) then
    24              found_stack := true;
    25           end if;
    26        else
    27           cnt := cnt + 1;
    28           -- cnt = 1 is ME
    29           -- cnt = 2 is MY Caller
    30           -- cnt = 3 is Their Caller
    31           if ( cnt = 2 ) then
    32              lineno := to_number(substr( l_line, 13, 6 ));
    33              l_line   := substr( l_line, 21 );
    34              if ( l_line like 'pr%' ) then
    35                 n := length( 'procedure ' );
    36              elsif ( l_line like 'fun%' ) then
    37                 n := length( 'function ' );
    38              elsif ( l_line like 'package body%' ) then
    39                 n := length( 'package body ' );
    40              elsif ( l_line like 'pack%' ) then
    41                 n := length( 'package ' );
    42              elsif ( l_line like 'anonymous%' ) then
    43                 n := length( 'anonymous block ' );
    44              else
    45                 n := null;
    46              end if;
    47              if ( n is not null ) then
    48                 caller_t := ltrim(rtrim(upper(substr( l_line, 1, n-1 ))));
    49              else
    50                 caller_t := 'TRIGGER';
    51              end if;
    52 
    53              l_line := substr( l_line, nvl(n,1) );
    54              n := instr( l_line, '.' );
    55              l_owner := ltrim(rtrim(substr( l_line, 1, n-1 )));
    56              l_name  := ltrim(rtrim(substr( l_line, n+1 )));
    57           end if;
    58        end if;
    59     end loop;
    60     select text
    61     into calling_line
    62     from all_source
    63     where line = lineno
    64     and type = caller_t
    65     and name = l_name
    66     and owner = l_owner;
    67     var_name := trim ( substr (
    68        calling_line
    69        , instr(calling_line, '(') + 1
    70        , instr(calling_line, ')') - instr(calling_line, '(') - 1
    71     ));
    72     dbms_output.put_line('variable passed had name '||var_name||' and value '||p_var);
    73  end;
    74  /
    Procedure created.
    SQL> create or replace procedure main_procedure
      2  is
      3     l_var varchar2(10) := 'Hello';
      4  begin
      5     get_var_name(l_var);
      6  end;
      7  /
    Procedure created.
    SQL> exec main_procedure;
    variable passed had name l_var and value Hello
    PL/SQL procedure successfully completed.cheers,
    Anthony

  • Is it possible to get the license of photoshop and lightroom after 4 years of subscription?

    Is it possible to get the license of photoshop and lightroom after 4 years of subscription?

    No, it is not. Perpetual licenses are not available.
    (If the reward for a few years subscription was a permanent license, soon Adobe's entire business model would collapse, because money from subscriptions would stop).

  • Is it possible to get file encoding?

    I am working with windows netsh util
    /**filename = path to file*/
    private static BufferedReader readFileWithBufferedReader(String filename){
            FileInputStream fis = null;
            InputStreamReader sr= null;
            BufferedReader r    = null;
            try {
                fis = new FileInputStream(filename);
            } catch (FileNotFoundException ex) {
                ex.printStackTrace();
            }//fis catch
            try {
                /*creating InputStreamReader with encoding param*/
                sr = new InputStreamReader(fis, "Cp866" /*"Cp1251"*/);
                System.out.println("encoding ::: " +sr.getEncoding());
            } catch (UnsupportedEncodingException ex) {
                ex.printStackTrace();
            }//sr catch
                /*wrapping to BufferedReader*/
                br = new BufferedReader( sr);
            System.out.println("YES!!!");   
            return br;
        }I get InputStream from console. I set encoding as "cp866" (it's O.K.)
    Then, I save stream to file.
    Then user can open this file and get config from file.
    The problem is in open file procedure.
    I do not know file encoding: it can be "cp1251" (windows cyrillic) or it can be "cp866" (cmd output).
    So if user tries to open "cp1251" file with "cp866" encoding, he gets unreadable characters.
    Is it possible to get file encoding and then re-create InputStreamReader with proper encoding?

    Well, you can't get the file encoding. It's not saved with the file. Unless it's your file format, in which case you can save whatever you want.
    There are apps that can guess a file's encoding.
    Of course, if you have control over the files entirely, it shouldn't be a problem, and generally it'd make life a lot easier to just use UTF-8.
    So if user tries to open "cp1251" file with "cp866" encoding,
    he gets unreadable characters.what if you read a "cp866" with "cp1251" encoding?

  • Is it possible to get source code of AutomationManager.as class or/and QTPAdapter.as?

    Sorry, we don’t really provide source for those classes right now.
    On 2/25/09 2:47 AM, "JabbyPanda" <
    [email protected]> wrote:
    A new discussion was started by JabbyPanda in
    General Discussion --
      Is it possible to get source code of  AutomationManager.as class or/and QTPAdapter.as?
    I have a license of Flex Builder 3.0.1 Pro, running Win XP.
    Inside "c:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\2.0.1\frameworks\source\mx\automation\"  folder I can only locate a listing of source code of IAutomationManager interface.
    Inside "c:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.2.0\frameworks\projects\automation\src\mx\automation\" folder there is also a bunch of open sourced classes present, but even source code of IAutomationManager interface is missing.
    And source code for AutomationManager.as and QTPAdapter.as classes are nowhere to find.
    And I tried to extract source files from Data Visualization package as suggested here
    http://blogs.adobe.com/flexdoc/2008/04/extracting_data_visualization.html, no luck
    View/reply at Is it possible to get source code of  AutomationManager.as class or/and QTPAdapter.as? <
    http://www.adobeforums.com/webx?13@@.59b80b91>
    Replies by email are OK.
    Use the unsubscribe <
    http://www.adobeforums.com/webx?280@@.59b80b91!folder=.3c060fa1>  form to cancel your email subscription.

    We can look at setting up some subtopic forums targeting specifics like automation once we have our new system in place.
    On 2/26/09 7:57 AM, "JabbyPanda" <
    [email protected]> wrote:
    A new message was posted by JabbyPanda in
    General Discussion --
      Is it possible to get source code of AutomationManager.as class or/and QTPAdapter.as?
    What I plan to do, is to write a couple of delegates to prepare (instrument) my custom components that extend from UIComponent for testing.
    I found the source file for AQAdapter.as from FlexMonkey tool at  
    http://code.google.com/p/flexmonkey/source/browse/trunk/FlexMonkey/src/com/gorillalogic/aq adaptor/AQAdapter.as, by studying the code of AQAdapter.as I can get the better idea what QTPAdapter.as does.
    In general, I found the documentation on test automation for Flex application to be very modest and limited, for example many attributes for XML-based "class information file" for HP QuickTest tool are not documented at Adobe Flex livedocs.
    BTW, is there any better place where test professionals and Adobe Flex developers exchange the knowledge on test automation of Flex apps?
    I've tried
    http://www.sqaforums.com by running search query
    http://www.google.com/custom?domains=SQAforums.com&! q=Adobe+Flex&sitesearch=SQAforums.com <
    http://www.google.com/custom?domains=SQAforums.com&q=Adobe+Flex&sitesearch=SQAforums.com> , but I left with a feeling the most enquiries were made by people who are just evaluating possiblity of testing of Flex apps with HP QuickTest tool.  

Maybe you are looking for

  • Can I sync Office 2013 Home premium Outlook calendar and contacts across all my computers without using Hotmail account

    I don't want to use a Hotmail account to do this. Is it possible? The licence is for 5 PC's but seems to have no sync ability.

  • ECC 6.0 and ECC 5.0

    < MODERATOR:  Message locked.  Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time. > SIR I have equerry about this. what is the difference between ECC 6.0 & ECC 5.0

  • HDD vs. HDV capturing.  What produces better quality

    I currently shoot for content in SD on mini DV tapes. I want to upgrade to a camera with either a 3 ccd or ? I have read alot about what is available but i am very confussed as to what format or camera I should purchase. I want to stay in the afforda

  • Best practice PDW database backup strategy/plan

    Hello All, We are ready with PDW infra , appliance is almost ready. we are planning for implementation. but before that , I have to document best practice for PDW database backup strategy/plan. since PDW environment is pretty new . Please help me wit

  • UC520W-8U-4FXO-K9 with 7.0.3

    I have an UC520W-8U-4FXO-K9 with the CME 7.0.3 version. The Unity is 3.2.1. I want upgrade the unity to 7.0.3 with Spanish language, but Im having problems with the language payload file. It looks like the uc520w doesnt support unity 7.0.3. This the