HTTPService/XML issue

Hey fellow Flexers
I'm a relative newb to Flex so there is probably a simple
solution to my issue, but I've been trying to fix this for hours
now with no success.
I'm loading in some XML using HTTPService and accessing the
parameters without any issue, it's the node value I have issues
with.
The XML is in the following format:
<events>
<comment up="1">Some text goes here 1</comment>
<comment up="3">Some text goes here 2</comment>
</events>
Now, with my current code I can access the 'up' parameter,
but I can't seem to get to the actual node value. i.e "Some text
goes here.."
My code:
<mx:HTTPService id="dataRequest" url=myURL/>
<mx:Panel>
<mx:DataGrid
dataProvider="{dataRequest.lastResult.events.comment}">
<mx:columns>
<mx:DataGridColumn headerText="Title"
dataField="comment"/> <<**this line is the issue**
<mx:DataGridColumn headerText="Up" dataField="up"/>
<< this line works fine
</mx:columns>
</mx:DataGrid>
<mx:Panel>
I've chopped out some of the code to make it readable. I know
that the code is incorrect but I've tried dozens of variations to
get it working but I'm having no joy.
Any ideas?
Thanks in advance.
Paul

Suggestions:
1) Use resultFormat="e4x" on the HTTPService tag. The default
is object, which causes Flex to convert the xml into a nested
object structure. God only knows the result of that.
2) Do not bind to the result. Use a result handler, so you
can debug the data.
Here are some code snippets below.
Tracy
Sample code using HTTPService, e4x, handler function to
populate a list item.
Also shows usage of AsyncToken.
The DataGrid tag:
<mx:DataGrid id="dg" dataProvider="{_xlcMyListData}"
.../>
The HTTPService tag:
<mx:HTTPService id="service" resultFormat="e4x"
result="onResult(event)" fault="..../>
Script block declaration:
import mx.rpc.Events.ResultEvent;
[Bindable]private var _xlcMyListData:XMLListCollection;
Invoke send:
var oRequest:Object = new Object();
oRequest.Arg1 = "value1";
var callToken:AsyncToken = service.send(oRequest);
token.callId = "myQuery1";
Result Handler function:
private function onResult(oEvent:ResultEvent):void {
var xmlResult:XML = XML(event.result); //converts result
Object to XML. can also use "as" operator
var xlMyListData:XMLList = xmlResult.myListData; //depends
on xml format, is row data
_xlcMyListData = new XMLListCollection(xlMyListData); //wrap
the XMLList in a collection
trace(_xlcMyListData.toXMLString()); //so you can see
exactly how to specify dataField or build labelFunction
var callToken:AsyncToken = oEvent.token;
var sCallId = callToken.callId; //"myQuery1"
switch(sCallId) {
case "myQuery1":
doQuery2();
break;
}//onResult

Similar Messages

  • HTTPService + XML Load + Memory Leak

    Hi all....
    I have noticed a memory leak in my application. This leak was
    not apparent when the application was completed some months back
    which is what left me a little confused as all I have done since
    was upgrade to Flex 3 and possibly updated / changed my Flash
    player.
    I think I have found the cause to this problem (below) but am
    not 100% sure that it is the "actual" problem or any reasons to
    back my thoughts up, so have listed what I have checked / tried
    along the way (maybe I have missed something)....
    My Discovery Process:
    I started profiling my application but did not find anything
    out of the ordinary. I did a code walk-through double checking I
    had cleaned up after myself, removing and even nulling all items
    etc but still to now success - the leak is still there.
    I have profiled the app in the profiler for reasonably long
    periods of time.
    All the classes etc being used within the app are consistent
    in size and instance amount and there is no sign of any apparent
    leak.
    I am using a HTTPService that is loading XML data which I am
    refreshing every 5 seconds. On this 5 second data refresh some
    class instances are incremented but are restored to the expected
    amount after a GC has occurred. The GC seems to take longer, the
    longer the app is running, therefore more and more instances are
    being added to the app, but when the GC eventually runs it "seems"
    to clear these instances to the expected amount.
    After scratching my head for a while I decided to make a copy
    of my application, rip everything out, and focus in my data load,
    where I found a problem!
    I have now just a HTTPService that loads an XML file every 5
    seconds, and this is all I currently have in the app (as I ripped
    the rest of the code out), e.g:
    Code:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    ....... creationComplete="initApp()" >
    <mx:HTTPService
    id="httpServiceResults"
    url="
    http://myIP:myPort/myRoot/myXML.cfm"
    resultFormat="e4x"
    result="httpResultHandler(event)" />
    <script....... >
    private var timerPulse:Timer;
    private function initApp():void
    httpServiceResults.send();
    timerPulse = new Timer(5000, 0);
    private function httpResultHandler(event:ResultEvent):void
    timerPulse.start();
    timerPulse.addEventListener(TimerEvent.TIMER, timerRefresh);
    public function timerRefresh(eventObj:TimerEvent):void
    timerPulse.stop();
    timerPulse.removeEventListener(TimerEvent.TIMER,
    timerRefresh);
    timerPulse.reset();
    httpServiceResults.send();
    </script>
    </mx:Application>
    This is pretty much the code I am currently using and it
    leaks.
    I ran and monitored this in both the profiler and the
    activity / task manager, and after running the app for 1800 seconds
    (30 min) in the profiler, the memory size grew from 50mg to 165mg
    just sending the HTTPService.
    I tried loading the service in multiple ways including in AS
    rather than MXML creating new instances of it each time, resetting
    it, nulling it etc... but nothing prevented this memory increase.
    I then tried to load the XML using different methods such as
    using the URLRequest and URLLoader which again caused a memory
    leak.
    What still confuses me is that this leak did not exist in the
    previous version and not a great deal has changed since then apart
    from upgrading to Flex 3 and possibly upgrading my Flash payer
    (which I believe is a possible cause)
    After looking into this issue a bit more deeply, I read a few
    blogs / forums and other people are experiencing the same problems
    - even with a lot bigger leaks in some cases all when reloading
    large sets of XML data into Flex - however, I as of yet found no
    solution to this leak - people with a similar problem believe it is
    not due to a memory leak more a GC error, and others pointing
    towards the Flash Player itself that is leaking - I don't really
    know.
    Findings so far during investigation of this issue:
    * App leaks for both HTTPService and ULRRequest / URLLoader
    methods
    * App only leaks when calling a data loader
    * The size of the leak seems to depend on the size of the
    XML being loaded
    * The size of the leak also seems to be affected by the
    applications heaviness - the greater seems to enhance the leak
    An interesting factor I have noticed is that if I copy the
    XML from my "myXML.cfm" that I link to in my HTTPService and copy
    the contents of the file into my own XML file stored within the
    Flex project root itself: ""myXML.xml"" the leak disappears... like
    it seems to link when loading the XML over a network, however as my
    network knowledge is not great I am not sure what to make of this -
    any ideas???
    Could the connection to the XML document cause leaks??? is
    there anything else that could cause this leak??? have I something
    in my code sample that could cause this leak??? or could any of the
    other things I have mentioed cause this leak???
    Any help / ideas would be greatly appreciated.
    Thanks,
    Jon.

    I also observed heavy memory leak from using httpservice with
    XML data. I am using Flex3 builder under Linux. My Flex application
    polls httpservice every 10 seconds. The reply is a short XML
    message less than 100 bytes. This simple polling will consume 30+
    MB of memory every hour. I leave it idling for several hours and it
    took 200 MB of memory. No sign of garbage collection at all.

  • SSRS-XML issue

    I have a field in the database table that contains an XML string. It is not formatted. In report we need to display it as formatted like XML
    xml, with highlight option, tree view with expand/collapse  option on each node. We are able to achieve the formatting with below script
    Public Function FormatXml(file_content As String)As String 
    Dim doc As New System.Xml.XmlDocument() 
    doc.LoadXml(file_content) 
    Dim sb As New System.Text.StringBuilder() 
      Dim settings As New System.Xml.XmlWriterSettings() 
      settings.Indent = True 
      settings.IndentChars = "    "     ' This includes 4 non-breaking spaces: ALT+0160 
      settings.NewLineChars = System.Environment.NewLine 
      settings.NewLineHandling = System.Xml.NewLineHandling.Replace 
      settings.OmitXmlDeclaration = True 
      Using writer As System.Xml.XmlWriter = System.Xml.XmlWriter.Create(sb, settings) 
        doc.Save(writer) 
      End Using 
      Return sb.ToString() 
    End Function
    But this is not working with all IE version.Mainly we are trying to get  tree view with expand/collapse  option on each node in the report .  Please help me in resolving this issue

    I've tried creating a new parm:Object but the issues still
    comes down to how Microsoft generates the URL parms using the ":"
    to define a variable.

  • Idoc flatfile to IDOC xml issue with new PI7.11 module SAP_XI_IDOC/IDOCFlat

    Hi,
    I am trying to develop a scenario as mentioned in the blog using the new module available in PI7.1,but I am getting this error
    "Error: com.sap.conn.idoc.IDocMetaDataUnavailableException: (3) IDOC_ERROR_METADATA_UNAVAILABLE: The meta data for the IDoc type "ORDERS05" is unavailable."
    I have made every configuration correct and IDOC meta data available in both SAP R3 and PI,but it is still complaning about the meta data does not exist.
    Blog:  http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13743%3Fpage%3Dlast%26x-order%3Ddate
    did anybody face issue with the new module available "SAP_XI_IDOC/IDOCFlatToXmlConvertor",please help me or give me mre information why I am getting this meta data error.
    Thank you,
    Sri

    Hi Sri,
    To Convert IDOC Flat file into IDOC xml from the given blog, the IDOC flat file should be present in standard format like:
    E2EDK01005                    0000047110815000000000001.........
    E2EDKA1003                    0000047110815000000000002.........
    E2EDKA1003                    0000047110815000000000003..........
    E2EDKA1003                    0000047110815000000000004........
    The Flat file have relationship as IDOC Number "000004711081500000" and segment sequence "0000001".
    If your flat file is not in this formate so i don't think that module is able to convert into IDOC xml. and if your file is already in this format then it may be issue with destinations which are created in NWA.
    Thanks
    Harish

  • Castor XML  issue

    Hi,
    i m using castor-1.0.3 for generating source code from xml schema.
    i ve a complex schema n even have binding file too for class name conflicts.
    The issue i m facing is when i run "
    java org.exolab.castor.builder.SourceGenerator....." it gets hung after generating certain class files. it ll never proceed. i need to explicitly terminate after waiting for a long time..
    I m stuck here as to what might be going wrong here..
    Kindly suggest.
    Regards,
    Lance

    FYI:
    I tried Castor. In my opinion, there's a much better solution BC4J. BC4J lets you read and write your objects to XML, using readXML and writeXML. It seems more mature than Castor.
    If you are just reading and writing your object or collection of objects and hierarchy to file, then you only use readXML and writeXML.
    With BC4J, you model you objects in BC4J, then BC4J allows you to create a DTD for these objects. So if you have inbound or outbound XML that you need to transform from/to, you can then use this DTD and the DTD/XML Schema of the other format to write a xslt transformation.
    Another benefit, you can pass object hierarchies across a web service using writeXML on the client side and then readXML to repopulate the object hierarchy on the server side of the web service.
    Richard Catlin

  • Deposit Advice XML Issue

    Hello Gurus, I am having an issue with XML Deposit Advice and XML Check Writer. In our deductions, we have City Withheld and Head Tax Withheld. For some employees, the City Withheld is showing as '0' on the Deposit Advice Slip but '6.92' on the SOE. Though the Deposit Slip shows '0' for withheld under deductions, the Net Pay matches with that on the SOE. Can anyone tell me why this is happening? Any help is highly appreciated.
    Thanks, Naveen.

    This is an internal error with Hr/Payroll.
    Thanks, Naveen Gagadam.

  • Menus.xml issue when trying to launch Dreamweaver CS4

    I have used Dreamweaver CS4 for many years on my Mac. I had a drive failure and have had to reload all of my applications from scratch as there seemed to be an issue with the Time Machine back up. Everything is working well apart from Dreamweaver CS4 which brings up an error message telling me to delete my menus.xml file and rename menus.bak to menus.xml which just doesn't work.
    I have checked and this has been asked before but none of the previous answers that I could find will work for me. Any new ideas?
    Apple MacBook Pro (mid 2010 model) running bang up to date version of OSX Mavericks.

    dg28 wrote:
    Thanks Preran
    One issue appears to be that Dreamweaver has loaded the help and configurations files into a folder in applications rather than in application support. I do not have a Dreamweaver CS4 folder anywhere in applications support under my identity or than of the loacl admin.
    You need to turn on your hidden folders to see it.
    http://guides.macrumors.com/Viewing_hidden_files_on_a_Mac

  • E4X Xml issue

    hi,
    I am facing an intermittent issue with E4X.
    I am trying to do following:
    1. Get XML from web service in string format.
    2. Replce \ using regular expression. Below is the code.
    webResult = webResult.replace(/&amp;/g, '');
    webResult = webResult.replace(/&/g, '');
    xmlResult = new XML(webResult.replace(/\\/g, ''));
    3. The issue is XML tags/attributes are mispaced as below.
    Input Xml (i.e. webResult) contains following line :
    <SourceHeaderKey Source="CI" SourceCode="20" Key="708011233708011233258956002000" />
    Replced with below string in E4X :
    <SourceHeaderKey Source="CI" SourceCode="20" Key=""708011233708rceCode="20" Key="708011233708011233258970002000"/>
    4. Key="708011233708011233258956002000" is correct, but in E4X it is Key=""708011233708rceCode="20" Key="708011233708011233258970002000"
    Any known issues with E4X. I tried searching on web but could  not find any.
    Any help is greatly appreciated. PLease help.
    Thanks,
    Aditya
    Adi

    Hi Aditya,
    You're asking this question in the wrong forum, this forum is for reporting issues with the forums themselves, not individual product support.
    I think your best bet to get some help with this is over in the JavaScript forum on the asp.net site:
    http://forums.asp.net/130.aspx/1?HTML+CSS+and+JavaScript
    One note though, I did see that Firefox has completely dropped support for E4X:
    https://developer.mozilla.org/en-US/docs/E4X/Processing_XML_with_E4X?redirectlocale=en-US&redirectslug=Core_JavaScript_1.5_Guide%2FProcessing_XML_with_E4X
    Good luck.
    Don't retire TechNet! -
    (Don't give up yet - 12,420+ strong and growing)

  • Help needed: HTTPService, XML, Repeater

    Hi there
    I am very much new to Flex 2 technology and require help
    regarding HTTPService and XML.
    In my main application (NestedRepeater.mxml), I have the
    following code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:comps="component.*" layout="absolute"
    creationComplete="userRequest.send()">
    <mx:HTTPService id="userRequest"
    url="/Users/ronnyk/Sites/book.xml" useProxy="false" method="POST"
    />
    <mx:VBox>
    <mx:Repeater id="Repeater1"
    dataProvider="{userRequest.lastResult.book.section}">
    <comps:Section
    sectionNumber="{Repeater1.currentItem.sectionnumber}"
    xmlSection="{Repeater1.currentItem}" />
    </mx:Repeater>
    </mx:VBox>
    </mx:Application>
    In my real app, I have a PHP script as the url for the
    HTTPService, but for the sake of simplicity, I'll just use
    book.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <book>
    <section>
    <sectionnumber>s1</sectionnumber>
    <chapter>
    <chapternumber>c1</chapternumber>
    </chapter>
    <chapter>
    <chapternumber>c2</chapternumber>
    </chapter>
    </section>
    <section>
    <sectionnumber>s2</sectionnumber>
    <chapter>
    <chapternumber>c3</chapternumber>
    </chapter>
    </section>
    </book>
    As you can see as well, I have a custom component called
    Section.mxml within the repeater of the main app, the custom
    component is as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var xmlSection:XML;
    [Bindable]
    public var sectionNumber:String;
    ]]>
    </mx:Script>
    <mx:VBox>
    <mx:Panel id="panel1" layout="absolute" title="Section"
    width="166" height="70">
    <mx:VBox>
    <mx:Label text="{this.sectionNumber}"/>
    </mx:VBox>
    </mx:Panel>
    <mx:Repeater id="Repeater2"
    dataProvider="{xmlSection.chapter}">
    <mx:Panel layout="absolute" title="Chapter" height="100"
    width="166">
    <mx:Label text="{Repeater2.currentItem.chapternumber}"
    />
    </mx:Panel>
    </mx:Repeater>
    </mx:VBox>
    </mx:Canvas>
    I am passing xmlSection="{Repeater1.currentItem}" to the
    custom component so that I can correctly create nested children for
    each parent. But anyway, my problem happens when I include
    xmlSection="{Repeater1.currentItem}" to the custom Section
    component, it always displays only one section (the label "s1"
    doesn't even appear), but if I exclude
    xmlSection="{Repeater1.currentItem}", when I run it, it displays
    correctly:
    s1
    s2
    Any help/suggestion would be greatly appreciated as I am at
    my wits end regarding my project.
    Let me know if you need any more info.
    Thanks!

    Hi again,
    After going through the HTTPService topic forum, I should be
    using resultHandler for my HTTPService, so I change my main mxml
    app into:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:comps="component.*" layout="absolute"
    creationComplete="userRequest.send()">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var myData:XML;
    private function resultHandler(event:ResultEvent):void {
    myData = event.result.book.section as XML;
    ]]>
    </mx:Script>
    <mx:HTTPService id="userRequest"
    url="/Users/ronnyk/Sites/book.xml" resultFormat="e4x"
    result="resultHandler(event)" useProxy="false" method="POST" />
    <mx:VBox>
    <mx:Repeater id="Repeater1" dataProvider="{myData}">
    <comps:Section
    sectionNumber="{Repeater1.currentItem.sectionnumber}"
    xmlSection="{Repeater1.currentItem}" />
    </mx:Repeater>
    </mx:VBox>
    </mx:Application>
    But now, when I run it, it displays nothing, just a blank
    browser. Can someone please help? Maybe because I shouldn't use
    creationComplete="userRequest.send()" in the Application tag?
    Thanks!

  • CWCLI and XML issue on RME 4.3

    Hi All,
         On a Windows 2008 Server with SP1 running LMS 3.2, I have a script that creates IOS configuration files with the appropriate XML command file for use with the cwcli config import function.  The XML file contains the following tags and values:
    <payload>
    <command>
       cwcli config import -u admin -p [Base64PWD] -device [DisplayName]
      <arg>
       -f
      </arg>
      <arg-val>
       D:\Program Files\CSCOpx\tftpboot\[DisplayName].cfg.[ID]
      </arg-val>
    </command>
    </payload>
    When I execute the sample script to invoke the Servelet, as provided in the RME users guide, I get the information that the job is running:
    <!-- Executing: cwcli config import -u admin -p [Base64PWD] -device [DisplayName] -f D:\PROGRA~2\CSCOpx\temp\argValFile.txt -->
    <cwcli> INFO - Devices to be attempted in the job:
    [DisplayName]
    <cwcli> INFO - The job 5548 is created
    Waiting for the job results ...
    <cwcli> - Job Status: Job Succeeded
    Successful Devices:
    [DisplayName]
    <cwcli> INFO - CM0107 Import the config file to PRIMARY Running Config on device successful CM0091 Check if the device prompt is available.
    CM0089 Config archival successful for [DisplayName]
    <cwcli> INFO - The transport mode used is TFTP
    SUMMARY
    ========
            Successful: import
    <!-- Processing complete -->
    After this is where it gets weird!  On the switch - having previously issued the command "term mon" - I see the following output displayed:
    Apr 28 16:56:38: %SYS-5-CONFIG_I: Configured from console by cw_2000_hq on vty2 (10.185.64.101)
    Apr 28 16:56:46: %SYS-5-CONFIG_I: Configured from tftp://[CWServer]/20110428165646943-[DeviceIP].cfg by console
    and checking the device I see that no changes have taken place.  Inspection of the file that was sent via TFTP to the device indicates why - it contains garbage:
       D:\Program Files\CSCOpx\tftpboot\[DisplayName].cfg.[ID]
    end
    The file I am specifying between the XML <arg-val> tags contains these commands:
    interface FastEthernet0/21
      switchport access vlan 2400
      switchport mode access
      no cdp enable
      spanning-tree portfast
      ip verify source
      shutdown
    end
    Can anyone tell me what I am doing wrong, please..?
    Thanks,
    SRGi

    The documentation is wrong.  Your payload should include the commands you want to deploy.  So, use:
       cwcli config import -u admin -p [Base64PWD] -device [DisplayName]
       -f
      interface FastEthernet0/21
      switchport access vlan 2400
      switchport mode access
      no cdp enable
      spanning-tree portfast
      ip verify source
      shutdown
    end

  • Premiere CC to ProTools OMF/XML issues

    XML and OMF audio timecode does not relink properly in external applications with my current Premiere CC / Mavericks configuration. Reverting to CS6 solves the issue described below...cannot say with certainty if previous CC versions solve the issue.
    Exporting OMF's to our sound engineer do not relink properly in ProTools - I've tried every available method for OMF export (encapsulated, referenced, etc).
    Exporting XMLs have a related issue - if an XML export is brought into another application (e.g. FCP 7) The audio region is correct but audio is not synced properly...it is pulling from incorrect timecode. This is externally recorded audio, recorded separately from source video. Video tracks are correctly synced.
    I can get accurate XML's out of Audition. Reverting to CS6 via XML and exporting OMF from there is my current workaround.
    Mac OSX 10.9.2
    Premiere CC 7.2.2

    Hi Andy,
    Sorry this isn't working for you.
    Can you export a much simpler version of your sequence?
    Can you try exporting only with mono tracks?
    Are there any nested sequences in the sequences?
    For file export, did you choose "encapsulate?"
    Are all the clips the same sample rate?
    Does the sample rate of the clips match sequence settings?
    Audition should work. If you have changed any of the above, please try another export from Audition.
    Thanks,
    Kevin

  • Loading audio into Adobe Edge via XML issue

    I am having an issue linking the location of an audio file via XML in Adobe Edge. I am able to get the info and post it as text, however I can not get it to load into the audio player. This is my first try at code ever, nothing too complex if possible.
    Here is the code that works along with the part I can not get to work.
    var fromName;
    var outputField = $(this.lookupSelector("xmlOutput"));
    $.ajax({   
        type: "GET",
        url: "edgesound.xml",
        dataType: "xml",
        success: function(xml) {
            fromName = $(xml).find('audio1').text();       
            outputField.html(fromName);    
        var newSound = new Audio();    
         newSound.src = "sound.mp3";
         newSound.volume = 0.5;
         sym.$("soundBtn").toggle(
    function(){
         newSound.play();
         sym.$(this).html('stop'); },
    function(){
         newSound.pause();
         sym.$(this).html('restart'); });
    // XML Try below   
         var newSound_xml = new Audio();    
         newSound_xml.src = "fromName";
         newSound_xml.volume = 0.5;
         sym.$("soundBtn_xml").toggle(
    function(){
         newSound_xml.play();
         sym.$(this).html('stop'); },
    function(){
         newSound_xml.pause();
         sym.$(this).html('restart'); });
    And here is the simple XML doc being called
        <?xml version="1.0" encoding="utf-8"?> <ax>  <audio1>sound.mp3</audio1>  </ax>
    I've also tried taking the .mp3 out of the xml and trying the following in the code with no success.
    newSound_xml.src = "fromName" + ".mp3";
    Thank you and here is a link to demo what I have so far.
    http://www.projectcog.com/audio/xml_audio.html

    Hi Exports,
    I am able to load directly from XML file to oracle tables. I am also successfully reverse engineer the XSD file into oracle relational structure but after that I don't know how to assign XML data file to the schema and load to oracle table
    Can you explain me the steps how to assign XML file to the schema (created from XSD ) and load to oracle table. which KM to use to load from XSD to oracle.
    Thanks,
    Mano

  • GReturn get.get('XML') issue (Roel)

    Roel,
    I have an issue with the "function call LOV onchange" (I have the same issue with autocomplete function od Denes)
    The first alert in the source below return the value of my item and it is send to the function but the second alert return '0', no result found
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM',pValue)
    alert(pValue);
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM','null')
    gReturn = get.get('XML');
    alert(gReturn.getElementsByTagName("item").length);
    When i execute the same function in SQL commands i have
    Content-type: text/xml; charset=UTF-8
    Cache-Control: no-cache
    Pragma: no-cache
    this xml genericly sets multiple items5EcarZb23
    Statement processed.
    U can see that a record is found for the id sent to the function.
    Could u help me? thx

    Hi Celio,
    Sorry for the late response.
    ODP is the On Demand Process
    From the JavaScript you make a call to a ODP procedure you need to create in the Shared Components.
    I like to use alert(myvariable); etc in my Javascript to see that values are getting to the ODP call.
    Then because the ODP is all PL/SQL I like to place a few insert statements to a table that I created called bcdebug.
    These inserts shows it actually got to the ODP and it is not a JavaScript problem.
    Then I would insert again to show the value for v('TEMPORARY_APPLICATION_ITEM') in the ODP also.
    I created a procedure called pdebug so I could debug my PL/SQL code.
    create or replace PROCEDURE "PDEBUG"
    (pinput IN VARCHAR2,
    pcommit IN BOOLEAN DEFAULT TRUE)
    is
    lString VARCHAR2(4000);
    lstart NUMBER;
    lLength NUMBER;
    lcnt NUMBER:=0;
    BEGIN
    --htp.p('PDEBUG['||length(pinput)||']');
    lLength:=length(pinput);
    lstart:=1;
    LOOP
    lcnt:=lcnt + 1;
    lString:=substr(pinput,lstart,4000);
    -- htp.p('PDEBUG-Length['||lLength||']');
    -- htp.p('PDEBUG-Start['||lstart||']');
    insert into bcdebug
    (input, create_dttm)
    values
    (lString,sysdate);
    lLength:=lLength - 4000;
    lstart:=lstart + 4000;
    EXIT WHEN lLength <= 0 OR lcnt >10;
    END LOOP;
    if(pCOMMIT)then
    COMMIT;
    end if;
    END;
    pdebug('In Get select List');
    pdebug(v('TEMPORARY_APPLICATION_ITEM ');
    Hope it helps for future coding too.

  • Accessing HTTPService xml attributes

    i have an HTTPService isntalled which gets an xml document,
    something like this
    <item>
    <doc name="x" url="htttp://www.yyy.com" />
    <doc name="x" url="htttp://www.yyy.com" />
    <doc name="x" url="htttp://www.yyy.com" />
    </item>
    i want to display each doc tag in a list component with
    attribute -->name<--, now as far as it goes i can only get
    the list
    to display: [object Object] and this is what my dataProvider
    for list components looks like:
    dataProvider="{service.lastResult.item.doc}" i have trid
    every single trick but i cannnot get the list to show the name
    attribute of each of those tags or even the url tag. what is the
    solution to this?

    iquaaani's approach is what I would also suggest, especially
    resultFormat="e4x". However, I don't advise binding directly to
    lastResult because it is hard to debug. Instead, use a handler
    function called by the result event.
    In that handler, do something like:
    var xmlREsult:XML = XML(event.result);
    trace(xmlResult.toXMLString());
    This will show you exactly what your result xml looks like,
    so you will know how to write the access expression.
    See this for more info on using XML:
    http://livedocs.macromedia.com/flex/2/docs/00001910.html
    Tracy
    Tracy

  • HTTPService XML contentType and Gets

    I have a flex front-end in which I'm trying to get data from
    a back-end using an HTTPService. I would like the service to use a
    GET, and make the request using the contenttype of application/xml.
    So for example here's an HTTPService that does this:
    <mx:HTTPService id="testService"
    url="/blah/list"
    contentType="application/xml"
    method="GET"/>
    When I go ahead and do the request (using testService.send())
    it always does the request as a POST. If I change the HTTPService's
    contentType to "application/x-www-form-urlencoded" it works
    correctly as a GET.
    Does anyone have any pointers on how I could get this to work
    the way I want it? Is this a flex bug or an undocumented feature
    somewhere? Any workarounds?
    Thanks.
    Here is the output I get when I put an <mx:TraceTarget>
    in the app with the contentType="application/xml":
    (mx.messaging.messages::HTTPRequestMessage)#0
    body = "<>"
    clientId = (null)
    contentType = "application/xml"
    destination = "DefaultHTTP"
    headers = (Object)#1
    httpHeaders = (Object)#2
    messageId = "3EB110BB-955A-9601-C595-C14D38E12C14"
    method = "POST"
    recordHeaders = false
    timestamp = 0
    timeToLive = 0
    url = "/pools/list"

    I think I may have been confused on the way flex goes about
    handling data requests. The final outcome I was looking for was
    that requests hitting the server from the flex app would have the
    accept type of 'application/xml' (so you'd do a .send() on the
    service and it would send out a request who's header would be ...
    Accept: application/xml).
    I was assuming that this parameter would change that, but I'm
    getting the feeling that that is more of an internal to the app
    setting than an outbound request parameter and that the browser
    will probably keep the same request header no matter what.
    So if you're running your flex app on Firefox your server is
    always going to see (for the time being)
    Accept:
    text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png ,*/*;q=0.5
    Hopefully that is clear.
    Anyone want to confirm/deny that?

Maybe you are looking for