XML in a custom [as 2.0] class?

why wouldn't this work as an AS2.0 class? the 'myXml' value
always comes up undefined. i've established that it is loading the
xml file and i've tried local and online xml files and i'm just
stuck... i'm new to class building.
thanks for your help.
the as file...

problem solved... i'll quote the response i got on another
forum...
"This is due to a very common scoping issue with AS2. When in
your code example the onLoad is triggered it's calling the
parseNews method. However, when it calls this method its executed
in the scope of the myXML object. You solve this by using a
Delegate as shown in the example below:"

Similar Messages

  • Parsing XML in a Custom Class Problem

    Hi, I am trying to parse an XML file from a class within my web app. It isn't a servlet, just a custom class to parse the xml.
    However, I keep getting a null document printed when I try to print the document to the log file. This is the class:public class XMLParser
         Document document;
         public XMLParser()
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              factory.setValidating(true);
              factory.setNamespaceAware(true);
              try
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   document = builder.parse(new File("SiteDescriptor.xml"));
              catch(SAXException sxe)
                   // Error generated during parsing
                   Exception x = sxe;
                   if(sxe.getException() != null)
                        x = sxe.getException();
                   x.printStackTrace();
              catch(ParserConfigurationException pce)
                   pce.printStackTrace();
              catch(IOException ioe)
                   ioe.printStackTrace();
              System.out.println("\n\n\n\n\n\n\n"+document+"\n\n\n\n\n");
    }I know this code works as I use the exactly the same code in another application with the same XML file.
    This is the XML file:
    <root host="http://localhost:8080">
         <branch name="Home Page" shortname="/" type="Home Page" instanceid="44987" typeid="1227">
              <branch name="Films Archive" shortname="/films" type="Branch" instanceid="96354" typeid="1778">
                   <leaf name="Evil Dead" shortname="/films/evil_dead" type="Films" instanceid="58985" typeid="1147"/>
                   <leaf name="1984" shortname="/films/1984" type="Films" instanceid="49741" typeid="1147" />
              </branch>
         </branch
    </root>And this is what I get when i print the document to the log file:
    [#document: null]
    Does anyone know why I cant get the class to read the document? I'm not getting any file not found exceptions or any other errors in the log.
    Cheers,
    Paul

    Hi duffymo, I have tried as you suggested. I created a ServletContextListener implementation and in my web.xml file I have defined the XML file as a <context-param> and I have also defined the listener.
    The ServletContextListener implementation creates the XML file as a resource using getResourceAsStream() and passes the InputStream to my parser. However, the parser still doesn't seem to work and prints out a null document in the log file: [#document: null]. Any ideas??
    The web.xml file:
               <context-param>
              <param-name>siteDescriptor</param-name>     
              <param-value>/WEB-INF/SiteDescriptor.xml</param-value>
         </context-param>
              <listener>
              <listener-class>cms.beans.InitializeXML</listener-class>
         </listener>
    ......and the ServletContextListener is:
    public class InitializeXML implements ServletContextListener
         static InputStream in = null;
         public void contextInitialized(ServletContextEvent sce)
              ServletContext context = sce.getServletContext();
              String siteDescriptor = context.getInitParameter("siteDescriptor");
              try
                   in = context.getResourceAsStream(siteDescriptor);
              catch(Exception e)
                   context.log("Error creating xml resource: " + e);
         public void contextDestroyed(ServletContextEvent sce)
         public static InputStream getXMLResource()
              return in;
    }Thanks,
    Paul

  • Error while defining class: com.crystaldecisions.data.xml.CRDB_XMLImpl This error indicates that the class: OCA.OCAdbdll.DbDLLOperations could not be located while defining the class: com.crystaldecisions.data.xml.CR...

    Post Author: lkamesam
    CA Forum: Integrated Solutions
    Hi,
            I am running Crystal Reports version 10 from IBM Rational 6.0.1  build 20050725_1800 XML data source. When I try to run the report under WAS 6.0.1 I get the following error:
    Does any body have any clue how to resolve my problem? Thanks
    Error 500: Error while defining class: com.crystaldecisions.data.xml.CRDB_XMLImpl This error indicates that the class: OCA.OCAdbdll.DbDLLOperations could not be located while defining the class: com.crystaldecisions.data.xml.CRDB_XMLImpl This is often caused by having the class at a higher point in the classloader hierarchy Dumping the current context classloader hierarchy: ==> indicates defining classloader *** indicates classloader where the missing class could have been found ==>&#91;0&#93; com.ibm.ws.classloader.CompoundClassLoader@163dd786 Local ClassPath: C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\classes;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\bobj_platform_jsf.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\cecore.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\celib.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\ceplugins.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\cereports.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\cesession.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\clientlogic.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\Concurrent.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CorbaIDL.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CRDBXMLExternal.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CRDBXMLServer.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalCharting.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalCommon.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalContentModels.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalExporters.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalExportingBase.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalFormulas.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalQueryEngine.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalReportEngine.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalReportingCommon.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\ebus405.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\icu4j.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\jrcerom.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\jsf_common.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\keycodeDecoder.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\log4j.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\MetafileRenderer.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\rasapp.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\rascore.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\rpoifs.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\serialization.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\URIUtil.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\webreporting-jsf.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\webreporting.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\xercesImpl.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\xmlParserAPIs.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent; Delegation Mode: PARENT_FIRST &#91;1&#93; com.ibm.ws.classloader.JarClassLoader@338761606 Local Classpath: Delegation mode: PARENT_FIRST &#91;2&#93; com.ibm.ws.classloader.ProtectionClassLoader@38e75786 &#91;3&#93; com.ibm.ws.bootstrap.ExtClassLoader@7e475784 &#91;4&#93; sun.misc.Launcher$AppClassLoader@7e5a5784 &#91;5&#93; sun.misc.Launcher$ExtClassLoader@7e565784 -Original exception- java.lang.NoClassDefFoundError: OCA/OCAdbdll/DbDLLOperations at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code)) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:576) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.crystaldecisions.reports.queryengine.driver.i.<init>(Unknown Source) at com.crystaldecisions.reports.queryengine.driver.i.case(Unknown Source) at com.crystaldecisions.reports.queryengine.av.ak(Unknown Source) at com.crystaldecisions.reports.queryengine.av.else(Unknown Source) at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source) at com.crystaldecisions.reports.queryengine.av.do(Unknown Source) at com.crystaldecisions.reports.queryengine.as.new(Unknown Source) at com.crystaldecisions.reports.queryengine.at.long(Unknown Source) at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.cy.b(Unknown Source) at com.crystaldecisions.reports.reportdefinition.cy.long(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.a(Unknown Source) at com.crystaldecisions.reports.common.ab.a(Unknown Source) at com.crystaldecisions.reports.common.ab.if(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.if(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.a.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory.createReportSource(Unknown Source) at com.crystaldecisions.report.web.a.a.K(Unknown Source) at com.crystaldecisions.report.web.event.aa.a(Unknown Source) at com.crystaldecisions.report.web.event.aa.a(Unknown Source) at com.crystaldecisions.report.web.event.bx.a(Unknown Source) at com.crystaldecisions.report.web.event.b1.broadcast(Unknown Source) at com.crystaldecisions.report.web.event.as.a(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.if(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source) at com.crystaldecisions.report.web.ServerControl.a(Unknown Source) at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source) at com.crystaldecisions.report.web.viewer.taglib.ServerControlTag.doEndTag(Unknown Source) at com.crystaldecisions.report.web.viewer.taglib.ReportServerControlTag.doEndTag(Unknown Source) at com.ibm._jsp._sample._jspx_meth_crviewer_viewer_0(_sample.java:135) at com.ibm._jsp._sample._jspService(_sample.java:77) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117) at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171) at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:230) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220) at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021) at

    For those who would have the same problem, here is how I could eventually fix it.
    Since the Flex Test Drive is sometimes out of sync with flash builder 4, I recreated a project using other help pages on Adobe site :
    Entry point :
    http://help.adobe.com/en_US/Flex/4.0/AccessingData/WSbde04e3d3e6474c4-668f02f4120d422cf08- 7ffd.html
    As suggested, I used the New Project wizard to create a new project, with :
    Application server type : J2EE
    Check the radio button "Use remote object access service : BlazeDS"
    Then, as indicated in following pages (section "Accessing BlazeDS")... :
    file:///C:/Mes%20documents%20C/Commun/Developpement/Documentation/HT-Tracks/AccessingData/ help.adobe.com/en_US/Flex/4.0/AccessingData/WSbde04e3d3e6474c4-668f02f4120d422cf08-7ffe.ht ml#WSbde04e3d3e6474c4-19a3f0e0122be55e1b7-8000
    ...I selected the "Data / Connect to Data/Services..." menu option, which started the Data/service connection wizard.
    There, I selected a BlazeDS (and not Web Services) service type, and everything went fine.
    Suggestion to adobe staff : maybe it would be useful to update the Flex Test Drive to reflect Flash Builder 4 ?
    Very nice product anyway, so far, congratulations...
    Rgds
    Marc.

  • Object Custom Program Name of class RE and language EN does not exist

    Hi All,
             We are getting this bbelow error while running a custome program ,
    Object <Custom Program Name> of class RE and language EN does not exist
    Do any one has faced this similar issue earlier.
    Regards,
    Sen

    Hi,
    How did you resolve this problem ?
    Re: Object <Custom Program Name> of class RE and language EN does not exist.
    I am also encountering the same issue when I am executing the report.
    Regards,
    SSR.

  • Compiler error "oracle.xml.parser.v2.XMLElement" not found in class com.ora

    Compiler error "oracle.xml.parser.v2.XMLElement" not found in class com.oracle.demos......?
    I am currently testing a simple sample application with a java code similar to the one shown at
    the bottom of this post.
    However during deployment/compilation the compiler gives an error:
    Error(26,23): XMLElement not found in class com.oracle.demos.orderbooking.ApproveImpl
    Additionally similar other errors appear:
    Error(23,66): JAXBException not found in class com.oracle.demos.orderbooking.ObjectFactory
    Error(51,58): UnmarshalException not found in class com.oracle.demos.orderbooking.ObjectFactory
    Error(9,92): Element not found in interface com.oracle.demos.orderbooking.Approve
    What's wrong?
    It seems to me that I have to add some (more) *.jar files/libraries to the project?
    Which *.jars and where should I add them in JDeveloper?
    source code:
    package com.oracle.demos.orderbooking;
    public class ApproveImpl extends com.oracle.demos.orderbooking.ApproveTypeImpl implements com.oracle.demos.orderbooking.Approve
    public ApproveImpl(oracle.xml.parser.v2.XMLElement node)
    super(node);
    }

    Hai James this the response I am getting can you please tell what should I write inside ora:getNodeValue() to get the value of node <genReturnText>
    The drag and dropping the variable name is not working, I have to write the path manually but I dont know how.
    <ns1:getRoutingAndFrameJumpersResponse xmlns:ns1="com.NetworkInstallations">
    -<com.GetRoutingAndFrameJumpersOutput>
    <destination>
    SW
    </destination>
    <e2EData>
    busProcOriginator
    </e2EData>
    <genReturnCode>
    40777
    </genReturnCode>
    <genReturnText>
    EMW_Get_Routing_And_FrameJumpers_Succeeded
    </genReturnText>
    <supplCode>
    ISY002
    </supplCode>
    <supplText>
    Transaction successfully completed.
    </supplText>
    <severityCode>
    S
    </severityCode>
    <retriable>
    false
    </retriable>
    </com.GetRoutingAndFrameJumpersOutput>
    </ns1:getRoutingAndFrameJumpersResponse>

  • Omit the XML declaration when using the PHP MM_XSLTransform class

    Hi
    Is there any way to omit the XML declaration when using the
    PHP MM_XSLTransform class?
    When using the PHP MM_XSLTransform to transform some XML into
    HTML, the XML declaration is faithfully delivered, which is
    expected. In my case though this ends up in the body of the
    document and is not desired. I wish to choose that the XML
    declaration is not shown.
    I have tried to use the <xsl:output method="xml"
    encoding="utf-8" omit-xml-declaration="yes"/> in the XSL
    stylesheet but the declaration still appears.
    Any help?
    all the best
    Dave

    Jim20005 wrote:
    > I'm using XLS transfomation in DW for reading XML files.
    Now (I'm just back
    > form holiday), my webspace provider has updated to php
    5.1.5. I'm getting this
    > error:
    Comment out line 301 and add two new lines immediately after
    it like this:
    // $xml = DOMDocument::loadXML($content);
    $doc = new DOMDocument();
    $err = $doc->loadXML($content);
    This is part of a PHP 8.0.2 hotfix that can be obtained
    directly from
    Adobe support.
    David Powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

  • Adding entries of default-catalog.xml into my custom resource catalog

    Hi,
    How can I add the contents of the default-catalog.xml into my own resource catalog?
    Use Case:
    I am creating my own resource catalog and under that catalog, I wanted to add two folders. One contains my custom links and the other folder should contain all of the
    entries in the default-catalog.xml. I tried dragging my default-catalog.xml into my custom resource catalog but it is appearing as a catalog reference and not as foldrs.
    How to do this?
    Thanks
    Webcenter 11.1.1.6

    Hi.
    Try to add manually in "Source" tab and not with "design drag & drop".
    You only have to copy <contents> information from default-catalog to your <contents/> folder information.
    In this link i share you have a custom resource catalog with two folders: http://dl.dropbox.com/u/46128268/OTN-Samples/catalog1.xml
    PD: It's a PS4 resource catalog archive, it's only for your help.
    Regards.

  • Loading XML using a custom class and accessing it from other classes?

    I began with a class for a movie clip rollover function
    FigureRollOver. It works marvellously. Three things happen:
    1) it loads XML from a file "mod1_fig1.xml" and uses another
    class, XMLMember, to retool the scoping of the XML so that I can
    get at it
    2) an onload call inside of XMLMember calls the myOnLoad
    function and transfers the XML into an array.
    3) so long as the array is finished building, rolling over a
    movie clip attaches a new movie clip with the rollover text in it.
    But I don't want all those functions in one because I need it
    to be more dynamic, starting with being able to load any old xml
    file instead of just "mod1_fig1.xml", plus it seems like
    overbuilding to have all of that in one class, so I've separated
    out the loading of the XML and building of the array into its own
    class, FigureXMLLoader. FigureRollOver is then left to just attach
    the rollover with text in it, extracted from the array built by the
    new class.
    Problem is, though the array builds inside FigureXMLLoader, I
    can't figure out how to make it available outside the class. I know
    that I'm constructing things in the wrong order, and that the array
    needs to be somehow built inside the class function to be
    available, but I can't figure out how to do that. A cruddy
    work-around is to put a function call at the end of the building of
    the array, which calls yet ANOTHER function on the main timeline of
    my .swf to put the array I've just built into a new variable. This
    works, but it's messy. It seems like I should be able to have one
    line of script in the .swf that generates an array on the main
    timeline (or just a public array) which I can then access from my
    FigureRollOver class:
    var myRollOvers:Array = new FigureXMLLoader("mod1_fig1.xml");
    Here is FigureXMLLoader (see comments in the code for more
    details) which obviously does not return an array as it is, because
    of all the working around I've had to do. Note the "testing"
    variable, which can be traced from the main timeline of the .swf,
    but I will get "not what I want" because of course the array hasn't
    been built yet, and never will be, inside of the declaration as it
    is. How do I get it in there so I can return an array?
    Thanks!

    Suggest you ask this question in the Actionscript forum as
    this forum is
    more tuned to database integration questions.
    You can create arrays outside a class and pass them into it
    by reference and
    visa versa build arrays inside a class and pass out via
    reference.
    The preferred approach is to place the array in a class and
    not expose it.
    Then add methods to use the array or should we say to use the
    class.
    Lon Hosford
    www.lonhosford.com
    Flash, Actionscript and Flash Media Server examples:
    http://flashexamples.hosfordusa.com
    May many happy bits flow your way!
    "maija_g" <[email protected]> wrote in
    message
    news:ed4i43$9v0$[email protected]..
    > Update: I've now put this on the main timeline of the
    .swf:
    >
    > myRollOversLoaded = false;
    > var myRollOvers:Array;
    > var roll_content = new FigureXMLLoader("mod1_fig1.xml");
    >
    > And inside the "myOnLoad" function in FigureXMLLoader,
    just after the
    > while
    > loop I've put this:
    >
    > _root.myRollOversLoaded = true;
    > _root.myRollOvers = figure_arr;
    >
    > The movie clip rollover won't act until
    myRollOversLoaded is true. It
    > works,
    > but it still seems klugey. Any suggestions for a more
    elegant solution
    > would be
    > appreciated.
    >

  • Error while uploading .xml file for Customer/Vendor List for Italy

    Hi All,
    We are facing problem while uploading the .xml file in DMEE transaction for the new Customer/Vendor List for Italy.
    We have followed the entire process given in the OSS Note(1090857).
    We have SAP 4.6c and followed the below steps:
    1. Created ID-FI-IT Development class
    2. Added domains
    3. Added Data elements
    4. Tried to upload the given .xml file and got any error saying ".xml file could not be interpreted".
    Also there is a .SAR file mentioned to upload if we receive any errors while uploading .xml file.
    Tried uploading the .SAR file also. STill we are recieving the same Error.
    Can any one of you help us out.
    Thanks in Advance.
    Ramesh

    Ok, we upload .SAR file in this way:
    1. unpack .SAR file with SAPCAR.EXE program. Yuo obtain 2 files
    R492445.P9C and K492445.P9C
    2. put K492445.P9C in directory \SAPMNT\TRANS\COFILES and put R492445.P9C in directory \SAPMNT\TRANS\DATA of your system (DEV, TST or PRD)
    3. Use Tx STMS. If You want create DMEE tree in DEV system, go to DEV import queue. Choose menu Extras | Other requests | Add. Insert P9CK492445 in Transp. request field.
    4. Import the request. This creates the DMEE tree. You don't need ti upload XML file after. You can see the DMEE tree created with Tx DMEE and inserting
    Tree type        UMS1            
    Format tree     IT_CUST_VEN_LIST
    5. after continue follow the note
    I hope this help you
    Roberto

  • JDev Extensions: Register only a particular XML file with custom Editor?

    Hi Guys,
    I have extended the Editor class and created my own Editor - MyCustomEditor. Below is the part of 'extension.xml', where I am registering any XML document with this editor.
    <editors xmlns="http://xmlns.oracle.com/ide/extension">
    <!-- Register our custom editor -->
    <editor id="myCustomEditor.design"
    label="My Design"
    editor-class="oracle.xxx.xxx.MyCustomEditor" >
    <node-type class="oracle.bali.xml.addin.XMLSourceNode" />
    </editor>
    </editors>
    But my actual requirement is to register my custom (design) editor to a particular XML file which has a fixed name, lets say MyApplicationFile.xml. I don't want this Custom Editor for any other XML document. How can I achieve this?
    Thanks,
    Rajesh.

    No JDev version??
    Here is what you can try.
    1. Subclass XMLSourceNode to CustomXMLSourceNode. Mention this class in editor tag.
    2. In addition to <editor> you may need to have <xml-recognizer> along with <include-filenames>MyApplicationFile.xml</include-filenames>.

  • Reading the xml file in customized table.

    Hi Experts ,
    I have a requirement to read the xml file in one "z" table . Can anyone let me know the exact steps .
    Thank you
    Ashutosh

    Hi Ashutosh,
    1. First read the file in BINARY MODE into an XSTRING.
    2. Then use the method create_istream_xstring to create the input stream
    3. Then you need to create the document tree and the parser
    4. Once your Document tree and your parser are created now can use the document tree to access individual elements.
    Some Class interfaces that maybe helpful to you are as follows: if_ixml_node, if_ixml_node_iterator, if_ixml_element....etc
    DATA:o_ixml                    TYPE REF TO if_ixml,
               o_streamfactory   TYPE REF TO if_ixml_stream_factory,
               o_istream              TYPE REF TO if_ixml_istream.
               o_parser               TYPE REF TO if_ixml_parser          
               o_document          TYPE REF TO if_ixml_document
    o_ixml = cl_ixml=>create( ).
    o_istream = o_streamfactory->create_istream_xstring( string = <give the xstring name here>).
    o_document = o_ixml->create_document( ).
    o_parser = o_ixml->create_parser( stream_factory = o_streamfactory
                                                                           istream = o_istream
                                                                       document = o_document ).
    You can make the final code as dynamic as possible to read into an internal table.
    Regards
    -Joe

  • How do I tie a custom-component to a class?

    In flash there's this great way of seperating code from
    content: In the properties menu of a movieclip in your library, you
    can assign a class name to the movie. So something I very regularly
    do is:
    class MyMovieClip extends MovieClip{
    //etc..
    so I'd have all the code that manages my movies nicely tucked
    away in some .as files, no code in the fla. That's the way I like
    it.
    So I was wondering if you can do a similar thing in Flex. I
    most definitely don't want the code for my application in the .mxml
    file, I actually want to inherit the Application class. Similarly,
    I'd like to inherit the Canvas class, yet have the nice gui for
    dragging all the visuall elements in place. Is there a way?
    Regard, and thanks in advance,
    Karel

    If you look in the library panel, there should be an entry for your custom component - probably something like CustomComponent1.mxml. Drag this out onto the artboard to create a new instance of the component.
    In the case of a custom component, you can't change much on the second instance. If you have something like a text input skin though, you can change the text it is displaying for each instance.
    We are working on making this sort of thing easier in the future, so stay tuned

  • How to use custom password encryptor/decryptor class for jdbc connection

    I am in process of migrating application from Jrun server to weblogic . In jrun we use to provide our custom class which used to decrypt the password provided in resource file as below
    <username>webclt</username>
    <password>AAAAAAASSSSSSSCCCCCCCCCCCCCC</password>
    <encrypted>true</encrypted>
    <encryption-class>com.CustomEncryptor</encryption-class>
    How could i use the same class while configuring datasource in weblogic 10 server.

    1- By default, the jre will read the user's cacerts which runs the program.
    2- You can specify another cacerts this way :
    System.setProperty("javax.net.ssl.trustStore", my_trust);
    For the case 1 and 2, you need to put the certificate in the cacerts.. Or,
    3- You implement a custom TrustManager which, for example, accepts all certificates :
    class X509TrustManagerTrustAll implements X509TrustManager {
    public boolean checkClientTrusted(java.security.cert.X509Certificate[] chain){
    return true;
    public boolean isServerTrusted(java.security.cert.X509Certificate[] chain){
    return true;
    public boolean isClientTrusted(java.security.cert.X509Certificate[] chain){
    return true;
    public java.security.cert.X509Certificate[] getAcceptedIssuers() {
    return null;
    public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
    public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
    and you call it in the right place in the code you wrote (SSLContext,..)
    Hope it helps and deserves a duke star ;)

  • Custom Fault Policy java class is not able to access mediator.jar file

    Hi,
    I am trying to implement the custom java class for mediator fault handling. However when this class is invoked its not able to access the "oracle.tip.mediator.common.error.recovery.MediatorRecoveryContext" class during run time (which exists in mediator.jar). However its able to access all the other imported class files which exists in other library files.
    Do we need to add mediator.jar to the weblogic classpath manually or should we place that jar file in some location in the server ?? Its currently residing in the path -- /app/oracle/product/soastg/11.1.0/SOA/soa/modules/oracle.soa.mediator_11.1.1/mediator.jar. I tried to copy the same jar into domain lib and admin lib path but there was no luck.
    Any input on this will be helpful.
    Thanks,
    Ramesh

    Hi Ramesh,
    Try out the following
    1) Copy mediator.jar from SOA_HOME>/soa/modules/oracle.soa.mediator_11.1.1 to <MW_HOME>//soa/modules/oracle.soa.ext_11.1.1/classes
    2) Goto <MW_HOME>//soa/modules/oracle.soa.ext_11.1.1/classes and run the following command:
    a. jar -xvf mediator.jar
    3) Now remove the jar file, i.e., mediator.jar from classes folder.
    4) Restart the server.
    Regards,
    Srijith

  • XML Validation using custom DTD file

    Well, I thought that my problem is about to be a trivial one, but now, I don't think so. I have to develop XML-based protocol over HTTP. XML Document doesn't contain any reference to DTD, but I have some DTDs. I want to validate my XML messages in real time and I want to find some library that allows to do something like that:
    SomeXmlValidatingParser s = new SomeXmlValidatingParser(InputStream dtdFileStream);
    for(;;)
        InputStream is = message.recive();
        DocumentObject = s.parseAndValidate(is);
    }So, the issue is to pass my custom DTD file (it is already loaded to memory) into validating parser.
    So, which library have such functionality? And if there are some, could you be so kind to advice some of them?

    Well, I've just realized that JDK 1.5 has standard way to validate XMLs using XSD schemas. Ok. But look at the sample
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="http://www.w3.org/2001/xml.xsd" />
      <xs:element name="birthdate">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="month" type="xs:string" />
            <xs:element name="day" type="xs:int" />
            <xs:element name="year" type="xs:int" />
          </xs:sequence> 
        </xs:complexType>
      </xs:element>
    </xs:schema>Every time I process this schema, it goes to w3c.org... And I wonder if it cause some problems if I delete
      <xs:import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="http://www.w3.org/2001/xml.xsd" />

Maybe you are looking for