Problem with socket responses with flex

Hi, I am using the code below to connect to an IMAP server.
When I telnet to the server and use the commands that I am sending in the code, the rsponses are correct.
However, when I run the code below, I only obtain the ready and logged in responses as shown below.
Any ideas why I am not receiving the full set of responses from the socket?
Thanks in advance fro your advice.
The following is the output from the code:
+++++++++++++++++ START SENDING IMAP DATA +++++++++++++++++++++++++
sent: . login user1 myPassword
sent: . status INBOX (messages)
sent: . select INBOX
+++++++++++++++++ END SENDING IMAP DATA +++++++++++++++++++++++++
++++++++ [IMAP START]
Response is: * OK Dovecot ready.
[IMAP END] +++++++++
++++++++ [IMAP START]
Response is: . OK Logged in.
[IMAP END] +++++++++
The code is:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx"
   applicationComplete="init()">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
public var dataStr:String;
private var socket:Socket;
private var serverURL:String= "dead.org";
private var serverPort:int = 143;
private var serverResponse:ByteArray = new ByteArray();
private function init():void
  this.serverURL = serverURL;
  this.serverPort = serverPort;
  socket = new Socket();
  socket.addEventListener(ProgressEvent.SOCKET_DATA,handleNewIMAPData); //Event when socket receives new data
  this.connectToServer();
  sendIMAPdata();
private function sendString(dataStr:String):void
  var bytes:ByteArray = new ByteArray();
  bytes.writeMultiByte(dataStr, "UTF-8");
  socket.writeBytes(bytes);
  socket.flush();
  trace("sent: " + dataStr);
public function sendIMAPdata():void
  trace("\t +++++++++++++++++ START SENDING IMAP DATA +++++++++++++++++++++++++");
  dataStr =". login user1 myPassword" + "\r\n";
  sendString(dataStr);
  dataStr =". status INBOX (messages)" + "\r\n";
  sendString(dataStr);
  dataStr =". select INBOX" + "\r\n";
      sendString(dataStr);
  trace("\t +++++++++++++++++ END SENDING IMAP DATA +++++++++++++++++++++++++");
private function handleNewIMAPData(event:ProgressEvent):void
  var numBytes:int = socket.bytesAvailable;
  serverResponse = new ByteArray();
  while(socket.bytesAvailable)
    var byte:int = socket.readUnsignedByte();
serverResponse.writeByte(byte);
  var response:String = serverResponse.toString();
  trace(" ++++++++ [IMAP START]\n Response is: " + response + "[IMAP END] +++++++++\n");
private function connectToServer():void
  socket.connect(serverURL, serverPort);
]]>
</fx:Script>
</s:WindowedApplication>

When I run telnet, the console responses are the same as the tcpdump messages.
When I run the program, the messages from tcpdump match the messages in my trace statements.
The messages from telnet and running the program are different:-)
I can only assume (at the moment) that I am sending multiple messages too quickly(?), but I did a quick and dirty big "for loop" to slow down the sending of subsequent messages, but with no resulting change in the programs behaviour.
So, still thinking about the problem -  unfortunately.

Similar Messages

  • Hey Guys, problem with Flex Time.

    Hey Guys,
    i have a problem with Flex Time. I was searching for a way to copy my 1-Tackt Timplin Beat to make 12 out of it, but there were always "wholes" between the new inserted regions. So i found Flex Time, but then when i choosed a Region, pressed the Flex Time button, nothing happend, except that the Header became a little bit bigger, as if there would been added a few more options, but there came only more free space .
    Would be great if somebody could help me!:)

    I would suggest Option dragging the bottom right edge of the Region so it fits precicely to the grid, then copy.  This is a quick way to time stretch...

  • Ridiculous problem with Flex!!!

    Actually, just kidding :) I've had a few, the ridiculous part
    being my lack of understanding :). I just want to say I'm really
    enjoying working with Flex, I love the Apps I've created, and I
    couldn't have done any of it without all of the excellent help I've
    recieved on this forum. I'm getting to the point now where I can
    figure things out just using all of the (very many) online
    examples. I hope in the future I'll be able to help others as much
    as I've been helped.
    Thanks folks!
    M.

    Hi again,
    after research I found out that apparantly it's not easy to make the preloader appear instantly (maybe impossible actually) although the DownloadProgressBar has a method that checks the ratiobetween timing and bytes downloaded  (showDisplayForDownloading).
    I assume that you can change this ratio or logically make the return value always true by extending the class. But this didn't work for me.
    I did found another solution (actually kind of a hack but it works) where you set a timer.
    This did make the preloader load instantly and smoothly.
    G

  • Swc problem with flex from my custom fla

    I have an fla which has several library items with a class linkage to a GenericButton.as file. I am exporting this fla as an swc file, and linking that swc into flex.
    My problem is that when flex builds the code for GenericButton it gets undefined property for anything it tries to reference that is part of the library item.
    Example:
    GenericButton.as does libLabel.text = "something"; where libLabel is a textfield, instantiated in the library clip which is bound to GenericButton in it's class linkage.
    The field exists in the clip, but when I compile in Flex with the swc in there, it cant find it. It says libLabel doesnt exist, undefined property.
    What am I missing here? I want to allow the fla author to bind some of his items to low-level component classes like that, and it's his job to ensure that all the necessary items are part of it. So if he makes a new button, he must just ensure he has a libLabel textfield somewhere in the clip.
    Why cant flex see that the items it's trying to compile have a libLabel in there? Is there a work around?

    Thx for the reply Greg, but no, that's not the problem.  If you re-read my post you'll probably see my problem is a little more involved than that.
    I have symbols exported for actionscript and I can instantiate them in Flex, that's not a problem.  The problem is symbols that are exported for actionscript and bound to a base class that contains custom code.  That custom code, when it uses it to type-check in flex builder (during the swc link stage), causes undefined properties.
    For some reason Flex is not seeing that the exported library item has the things the .as file is looking for.
    Does that make sense?
    I could probalby put together a simple example project but I'd have to find somewhere to upload it so that others could see.
    This problem is hard to describe, you have to read what I'm saying very carefully.

  • Video Display Problems with Flex Builder 2

    I am currently trying out the Flex Builder 30-day trial and
    have been having problems running the software.
    System info:
    FB 2.0.1
    Dell Latittude D820 running WinXP
    NVIDIA Quadro NVS 120M Video Card
    When I first installed it, my display turned to garbage and I
    had to reboot my machine to get it to a usable state. Someone
    suggested changing my display properties and see if it helped. When
    I tried 768X1024 with 8-bit color it worked. Once I installed it, I
    changed them back to 1920X1200 32-bit. Everything seemed to work
    fine until I started getting into some more complicated tutorials.
    My display crashed and looked similar to what I saw before. I
    updated to the latest NVIDIA driver from Dell. No help. I then
    tried the Windows Troubleshooting. When I turned my hardware
    acceleration to None, it started working again. There are some
    weird display issues with menu buttons and I can't launch my Nvdia
    software.
    Is there a better solution to this? Has anyone had this
    problem? I'm not so sure I'll purchase the software with this many
    problems.
    Thanks,
    Wendi

    Boys n Girls
    I am Currently restoring my Power Book after a significant meltdown.
    Thanks for posting I too saw the shearing effect but shrugged it off thinking oh well I'll just reboot!
    If you are seeing this Buy a fire wire drive NOW and Back-up.
    I suspect the Video update changed a low level feature in the power management routines and this resulted in my Power book cooking itself.
    I've got a 12mth old Hitachi 7200 PATA drive in my Power Book after the Apple Drive cooked itself soem tim back and I have now got to back-up and restore my whole system. Luckiliy I have plenty of Big fast firewire drives around so I'm imaging the corrupt drive and going to run the Hitachi tool on it via a WINDOZE Thinkpad. Then a combination of clean install of 10.5.x and a migration assisted restore should do it.
    I'm really not very happy though! My Time machine image did not restore and the disk repair did not work. I have a corrupted asl.DB ( the log file for Apple System Logs) and the mac won't boot from its internal drive.
    I'll post the resolution here as it happens I'm at hour Disaster + 24 so I'm really cranky!
    I suggest If you have a G4 Power Book you resist the temptation to install the video update.
    Regards

  • Problems with flex and php.

    Hello, my name is Gamaliel Arredondo, i have to develope a project in flash builder 4 using the data service to connect with php, the application has installed the zend framework automatically just like the tutorials said, I use xampp and i have the files in the htdoc location, all the path are correct but when i want to connect to my php classes i receive this message:
    Make sure that Zend Framework is installed correctly and  the parameter "amf.production" is not set to true in the amf_config.ini file  located in the project output folder.     /0/onResultÿÿÿÿ � Uflex.messaging.messages.AcknowledgeMessage correlationId clientId destination messageId timestamp timeToLive headers  body I797BFBCC-250A-A100-9954-68CD2AC82DF5 I2570DA6E-2F76-55E9-2249-000075B2C293  I590AA123-C3CE-5F48-6A94-00002F9B370A  126571301000      ‡G
    I have searched on internet in order to find a solution but i haven't found anything that can help me, so i would like to receive some of help, my email is [email protected], if you can help me i will thank you so much, have a nice day.

    Hello, I am Gamaliel Arredondo, i have solved this problem, the error is in the code, you have a mistake in your code, check it out.
    The way to run the flex applications, in my case, i installed xampp, in the htdoc directory i put the folder with the files of the application and all is working very well, only when the apache is running because if it is stoped the application show error, please review your code and if you have problems you can contact me by e-mail ([email protected]) i also fought with that problem but i could find the solution, i hope to help you.

  • Problem with Flex Builder 4 Plugin and SpringSource 2.3.2.RELEASE

    I am getting following error while opening up a Flex project. The file icons are showing up correctly but then it is creating a stream of following errors.Any help is appreciated.
    Session Data
    eclipse.buildId=2.3.2.201003230009-RELEASE
    java.version=1.6.0_18
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Framework arguments:  -product com.springsource.sts.ide
    Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product com.springsource.sts.ide
    Exception Track Trace:
    java.lang.NoClassDefFoundError: com/adobe/flexide/editorcore/EditorUtility
    at com.adobe.flexbuilder.editorcore.editor.ToggleModeAction.selectionChanged(ToggleModeActio n.java:64)
    at org.eclipse.ui.internal.PluginAction.refreshEnablement(PluginAction.java:206)
    at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:277)
    at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:299)
    at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.j ava:156)
    at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionServ ice.java:62)
    at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.runtime.Platform.run(Platform.java:888)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
    at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2132)
    at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1160)
    at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1190)
    at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:228)
    at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:222)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:389)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

    I can reproduce the problem but for me it does not seem that it is caused by the SSL handshake because that one is already successfully finished at the moment of the ClassNotFoundException. Did you try the phenomenon with different browsers and/or the appletviewer too ? Maybe it is only a problem of the plugin class loader. How did you convert to Java 1.4 ? I always use a HTML template with an <applet> tag and then use htmlconverter from the JDK to convert it to the needed JRE.
    good luck - mad

  • Problem with Flex Builder 3

    Hey Experts,
    I tried creating Flex Library Project in Flex Builder 3. No issues so far. Everything works fine. When the day ends, I close Flex Builder (without closing the project as it restores them during next launch). I had to close it...I can't keep the system running. Global warming you know...Next day when I launched Flex Builder, I could see my project there. However, when I open Project Properties dialog box, I get some errors while trying to open Flex Library Build Path or Flex Library Compiler pages. The error says "The currently displayed page contains invalid values."
    C'mon man you gotta be kidding me. Yesterday you didn't say anything. What's the matter with you today. By the way, I didn't change anything in properties. How could I? I am unable to open it...
    Does anyone understands Flex Builder's logic here?

    Mate the first thing I tried was this...
    If you want to see the problem, try crating a Flex Library Project in Flex Builder 3. Create couple of classes and close Flex Builder without closing the project. Re-launch Flex Builder and try to open Project -> Properties -> Flex Build Path or Project -> Properties -> Flex Compiler. You should be able to see the problem.

  • Problems with Flex builder upgrade

    Hi, I'm trying to upgrade my copy of Flex Builder to
    2.0.1 so that I can install the Apollo plugin, but when I run the
    upgrade the wizard says it cannot find the correct folder
    apparently it does not contain the plugin and features folders, but
    I know it does I can see them. I have installed Flex builder on the
    D drive of my PC, I'm not sure if that is the cause of the problem.
    I also have a copy of Eclipse 3.2 with the Flex Builder plugin
    installed, which does have the Apollo plugin working, but I'd like
    to have the full Flex builder working so I can use the RDS plugins
    to view my databases, which doesn't work in Eclipse 3.2.
    So what is the best place to have Flex Builder installed so I
    can get Cfeclipse, RDS and Apollo plugins to work?
    Thanks
    Stephen

    Is Flex Builder running? In Beta 3 we have a problem in that
    we were opening the Help in an external browser, which stays open
    when you stop Flex Builder (which, in turn, stops the Tomcat
    instance that runs the Help).
    For final, we'll rever to using the internal browser window
    by default, which closes when you close Flex Builder.
    HTH

  • Problems with Flex 2 beta 3 tutorials

    In the tutorial:
    Build a distributed application with the ActionScript object
    adapter
    the following mxml file is written:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    height="100%" width="100%"
    creationComplete="initApp();">
    <mx:Script>
    <![CDATA[
    import mx.data.DataService;
    import mx.data.events.*;
    import mx.rpc.AsyncToken;
    import mx.rpc.events.*;
    import mx.messaging.events.*;
    import mx.utils.ObjectProxy;
    public var noteObj:Object = new Object();
    public var getToken:AsyncToken;
    private var ds:DataService;
    [Bindable]
    public var noteProxy:ObjectProxy;
    private function initApp():void
    ds = new DataService("notes");
    ds.addEventListener(ResultEvent.RESULT, resultHandler);
    ds.autoCommit = false;
    noteObj.noteId = 1;
    noteObj.noteText = "Type your notes here and share them with
    other clients!";
    getToken = ds.getItem(noteObj, noteObj);
    public function resultHandler(event:ResultEvent):void
    if (event.token == getToken)
    noteProxy = ObjectProxy(event.result);
    ]]>
    </mx:Script>
    <mx:Binding source="log.text"
    destination="noteProxy.noteText"/>
    <mx:TextArea id="log" width="100%" height="100%"
    text="{noteProxy.noteText}"/>
    <mx:Button label="Send" click="ds.commit();"/>
    </mx:Application>
    When I run it, I get the error:
    MessagingError message=Unknown destination 'notes'.
    This destination is correctly specified in the
    flex-data-service.xml
    file (I did not have to change it) which is located at
    C:\fds2\jrun4\servers\default\samples\WEB-INF\flex, which I
    think is the
    correct place for it, but how does flex know which directory
    to use?
    In the default server there is another directory called
    flex\WEB-INF\flex which also contains a (different)
    flex-data-service.xml file.
    I tried the file with the 'notes' destination in it in this
    directory,
    but that didn't work either.
    The complete error message is:
    MessagingError message=Unknown destination 'notes'.]
    at mx.messaging.config::ServerConfig$/getChannelSet()
    at
    mx.messaging::MessageAgent/mx.messaging:MessageAgent::initChannelSet()
    at mx.data::DataConsumer/initConsumer()
    at
    mx.data::ConcreteDataService/
    http://www.adobe.com/2006/flex/mx/internal::reconnect()
    at mx.data::ConcreteDataService/getItem()
    at mx.data::DataService/getItem()
    at tutorials1/initApp()
    at tutorials1/___Application1_creationComplete()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/set initialized()
    Can anyone offer any clues about how the messaging service in
    Flex2
    works and where I might look to try to solve the problem?
    Doug

    Sorry to waste everyone's time. I realized as soon as I'd
    written the
    post that flex knows where to find the file because it has to
    be in the
    same directory.
    Once I moved the files into a tutorials directory in
    C:\fds2\jrun4\servers\default\samples\WEB-INF\flex
    it all worked.
    Pity MM didn't just write that in the tutorial instead of
    talking about
    a 'samples web application' which for newcomers surely is
    meaningless.
    Doug

  • Problem with Flex Beta3 and Design mode

    Hi
    I’ve installed de Flex beta 3 version and Flex exit the
    programm with an error feed back :
    VM terminated. Exit code=1 and many others parameters when I
    click on the Design button mode.
    System Vista Pro, 32 bits, french version, 4Go of RAM, video
    : NVIDIA GeForce 8600M GT
    Thanks

    Hi,
    I've been having this same issue: Open Flex 3 milestone 4
    --> Create New Project --> Click Finish --> Click on the
    Design Mode Tab --> Crash!
    I've checked the error log and my name only has the
    characters: (1, a, e, n, p, y). None of these, from what I can
    find, are
    high ASCII or 2-byte characters.
    Here
    is a screenshot of the error message/window that comes up.
    Here is the
    error log that is generated. (I'm not sure if there is more
    info in this than I should be posting, please let me know if i
    should remove this).
    Anyway, this error is pretty frustrating and is causing me
    some substantial grief at work. Any help and/or tips would be
    appreciated.
    Thanks,
    -Tom

  • Problems With Flex Time

    I just updated to Logic 9 on my late model Mac Book pro, and I was all excited to do some beat detective type drum editing. I am attempting to create transient markers and separate the audio files, based on kick and snare hits, and then align to the grid, and manually tweak crossfades, to avoid unwanted audio artifacts. However, when I control click on a file and attempt to 'slice at transient markers,' I get an error message that says Logic can only cut transients 32 bars at a time. Really? That seems wimpy. Second, when I go ahead and shorten the song to 32 bar chunks and try again, logic does not cut the markers based on the Q-reference tracks, but instead cuts every marker on every track. My drums are grouped as a phase aligned editing group, but obviously, there is no possibility of aligning to grid when single transient is cut. Help!!! What am I missing?

    The title says 'flex' but your description doesn't sound like your using flex time here, so I'll point you to this video that may help with the way you are trying to do it:
    2 parts (yeah, they're the same as that other thread)
    http://www.youtube.com/watch?v=KyhERxK-YD8&feature=channel
    http://www.youtube.com/watch?v=WHUuWZ4xE7w&feature=channel

  • Problem with Flex Plugin for eclipse

    Hi there
    I have downloaded the latest Europa Eclipse and also the the
    Flex builder plugin. The Flex wizard for installing the plugin
    tells me to select the folder where my eclipse is installed. When I
    do this, I get an error message saying that I must choose a valid
    3.* Eclipse directory.
    I have no idea what the problem is?????

    Hi
    I am having same issue, I don't know how to procced. My
    installation has eclise Version: 3.3.1.1
    Build id: M20071023-1652 and configuration directory.
    Any help on this is highly appreciated
    thanks
    Jay

  • Problems  with Flex

    Please  could  someone   tell me what  is it I am doing wrong.   have  been trying to display jsp data in a  Flex  datagrid.  I have  not been successful.  My code is  submitted below:
    Thank You
    Jonas
    My Flex   Code
    ============================================================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        applicationComplete="employeeService.send()" viewSourceURL="srcview/index.html">
    <mx:HTTPService id="employeeService" useProxy="false"  resultFormat="e4x" method="POST"
      url="http://10.60.7.49:8084/myTest/workers.jsp" />
                 <mx:DataGrid  width="657" height="345"  dataProvider="{employeeService.lastResult.people.person}" x="64" y="96">
                             <mx:columns>
                    <mx:DataGridColumn dataField="name"   headerText="Name"/>
                    <mx:DataGridColumn dataField="age"    headerText="Age"/>
                    <mx:DataGridColumn dataField="skills"  headerText="Skills"/>
                  </mx:columns>
                </mx:DataGrid>
    </mx:Application>
    my  Jsp  Code:
    =========================
    <%
    out.println("<?xml version=\"1.0\"  encoding=\"UTF-8\"?><people><person><name>jonas okwara</name><age>43</age><skills>Java, C++ </skills></person<person><name>chioma okwara</name><age>35</age><skills>bible, linux</skills></person></people>");
    %>

    Try the following:
    dataProvider="{employeeService.lastResult..person}"
    The '..' operator returns a list of all 'person' elements in the XML.

  • Problem with Flex print- characters are being chopped off

    help please

    Bottom of the page characters are being chopped off I am
    using
    private function doPrint():void {
    var myPrintJob:FlexPrintJob = new FlexPrintJob();
    myPrintJob.start();
    myPrintJob.addObject(printArea1);
    myPrintJob.send();
    Code is:
    <mx:Canvas backgroundColor="white" height="70%"
    width="100%" visible="true">
    <!-- The following part of the code being executed when
    user clics on Print Button -->
    <mx:VBox width="90%" height="100%" visible="true"
    id='printArea1' includeInLayout="true">
    <mx:VBox paddingLeft="0" paddingRight="0"
    horizontalGap="0" >
    <mx:HBox>
    <mx:VBox width="20%">
    <mx:HBox>
    <mx:Label styleName="printFont" text="Role:"
    width="50"/>
    <mx:Label styleName="printFont"
    text="{role.selectedItem.DAFYROLE}"/>
    </mx:HBox>
    </mx:VBox>
    <mx:VBox width="40%">
    <mx:HBox id='idPrintFacility'>
    <mx:Label styleName="printFont" text="Facility:"/>
    <mx:Label styleName="printFont"
    text="{facs.selectedItem.LABEL}"/>
    </mx:HBox>
    </mx:VBox>
    <mx:VBox width="30%">
    <mx:HBox>
    <mx:Label styleName="printFont" text="Patient:"/>
    <mx:Label styleName="printFont"
    text="{patient.selectedItem.LABEL}"/>
    </mx:HBox>
    </mx:VBox>
    </mx:HBox>
    <mx:HBox>
    <mx:VBox width="20%">
    <mx:HBox>
    <mx:Label styleName="printFont" text="Filter By:"/>
    <mx:Label styleName="printFont" text="{filter.text}"/>
    </mx:HBox>
    </mx:VBox>
    <mx:VBox width="40%">
    <mx:HBox>
    <mx:Label styleName="printFont" text="From"/>
    <mx:Label styleName="printFont"
    text="{fromDate.text}"/>
    <mx:Label styleName="printFont" text="To"/>
    <mx:Label styleName="printFont" text="{toDate.text}"/>
    </mx:HBox>
    </mx:VBox>
    </mx:HBox>
    </mx:VBox>
    <mx:Repeater id="idCatsx" dataProvider="{myNotes}"
    width="100%" >
    <mx:HBox id="idCatLabel">
    <mx:HBox>
    <mx:Label styleName="printFontBold"
    text="{idCatsx.currentItem.LABEL}" fontWeight="bold" />
    </mx:HBox>
    <mx:HBox>
    <mx:Spacer width="10"/>
    </mx:HBox>
    </mx:HBox>
    <mx:HBox width="100%">
    <mx:VBox width="10%">
    <mx:Spacer width="10"/>
    </mx:VBox>
    <mx:VBox width="90%" height="100%">
    <mx:Repeater id="idTipsx"
    dataProvider="{idCatsx.currentItem.NOTES}" >
    <mx:HBox width="100%" verticalGap="0" >
    <mx:VBox>
    <mx:Label styleName="printFont"
    text="{idTipsx.currentItem.NOTES_DATE}" />
    </mx:VBox>
    <mx:VBox height="100%">
    <mx:HBox height="100%">
    <mx:Text width="500" styleName="printFont"
    text="{idTipsx.currentItem.NOTE_TEXT}" />
    </mx:HBox>
    <mx:HBox height="100%">
    <mx:Text styleName="bold" width="600"
    text="{idTipsx.currentItem.ADDMODIFYTEXT} on
    {idTipsx.currentItem.TIME_STAMP} for Assessment
    Date:{idTipsx.currentItem.ENCDATE_DATE}" />
    </mx:HBox>
    </mx:VBox>
    </mx:HBox>
    <mx:HBox verticalGap="0">
    <mx:VBox width="100%" verticalAlign="top" verticalGap="0"
    height="100%">
    <mx:VBox >
    <mx:Repeater id="idHistx"
    dataProvider="{idTipsx.currentItem.HIST}">
    <mx:HBox width="100%" >
    <mx:VBox>
    <mx:Spacer width="115"/>
    </mx:VBox>
    <mx:Canvas height="100%">
    <comp:StrikeThroughText width="500" height="100%"
    styleName="printFont"
    text="{unescape(idHistx.currentItem.NOTE_TEXT)}"/>
    </mx:Canvas>
    </mx:HBox>
    <mx:HBox>
    <mx:VBox>
    <mx:Spacer width="115"/>
    </mx:VBox>
    <mx:VBox height="100%" width="100%">
    <mx:Text width="600" styleName="bold" text="Notes
    {idHistx.currentItem.ADDMODIFYTEXT} on
    {idHistx.currentItem.TIME_STAMP} for Assessment
    Date:{idTipsx.currentItem.ENCDATE_DATE}" />
    </mx:VBox>
    </mx:HBox>
    </mx:Repeater>
    </mx:VBox>
    </mx:VBox>
    </mx:HBox>
    </mx:Repeater>
    </mx:VBox>
    </mx:HBox>
    </mx:Repeater>
    </mx:VBox>
    </mx:Canvas>

  • Problem with the flex and the webservice

    Hey everyone,
    I have a problem with flex; I declared a web service ( that I
    test it and it works ) inside flex and declared also the operation.
    But it seems that flex doesn't recognize the web method so
    when i use something like
    ws.Getheader.send()
    it pop up an error : Property Send not found on ....
    and in the intellisens menu after I write ws. I don't find my
    method
    here is a fragment of the code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    xmlns:local="*"
    creationPolicy="all"
    backgroundColor="white"
    backgroundGradientColors="white"
    themeColor="#8190b7"
    width="970"
    creationComplete="initVars()">
    <mx:WebService id="ws" wsdl="
    http://localhost/csp/SearchWS.asmx?WSDL"
    useProxy="false">
    <mx:operation name="SearchHeaderText" />
    </mx:WebService>
    <mx:Script>
    <![CDATA[
    import mx.events.ListEvent;
    import flash.net.*;
    import mx.rpc.soap.*;
    import mx.controls.Alert;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    import mx.utils.ObjectUtil;
    import mx.rpc.http.HTTPService;
    private function initVars():void
    ws.SearchHeaderText.Send()
    ]]>
    </mx:Script>

    Have you tried the data wizard in Flex Builder 3 ?
    Data > Import Web Service (WSDL).
    It will create all the classes automatically for you from the
    WSDL. More about this here:
    http://www.adobe.com/devnet/flex/articles/flex_ws.html?devcon=f4

Maybe you are looking for

  • Crystal Reports 2008 - Excel 2007 Data Source

    Have been using Crystal reports 10 and have downloaded 2008 but I can't see a way that I can use an Excel 2007 spreadsheet .xlsx as a datasource. The reason I need 2007 is due to the increased number of columns. Can anyone confirm if it can be done i

  • Tips on how to speed up preview/debug build time?

    I am building an air2.5 application and I am still learning the finer details of Flash. Our project has a number of images and sounds, and the file size is starting to get up there, but nothing that we are worried about for our end product. However,

  • Using Photoshop elements 9 with two monitors

    I used Photel 6 with no problem on my Macbook Pro + Lacie 324 monitor, and used to slide the photo on the LaCie and keep the tools on the Macbook Pro screen. I just installed Photel 9 and I cannot do that anymore. Does anyone know why and tell me how

  • How to make a movie from sequence of images?

    Hello buddies, I need to build a movie from sequence of images.The sequence of images will be created from YUV(YCbCr) values. How can I create a movie from the sequence of images?

  • Activationof UPDATEunder shopfloorinformation in implementation tab in OPL8

    Hello All, I have activated the update field in shop floor information in OPL8 transaction under the implementation tab. Now where can see the impact of change i.e.. like in COOIS reports or else BI reports. I would like to test the scenario.Kindly h