BlazeDS Java to ActionScript

Hello, I am trying to send certain data types from a Java
back-end through BlazeDS to my Flex clients. I wrote a ant script
that takes JAXWS generated types and converts them into
ActionScript types. One problem that I am facing is that the Seq
classes are not being translated. What I mean is that JAXWS classes
that contain List get wrapped into a class name ClassBSeq which
contains a List<T> object. From the Java back-end I send the
JAXWS types in a List to BlazeDS. The List contain a Seq classes
that have List<t>. It seems on the client side that the main
List gets translated but any List after that are null. Seems like
it translated the top level List but no other List after that. Is
there a way to tell the channel, in this case a
StreamingAMFChannel, to transverse the object being translated?
Here some code to help with my explanation.
The Java Type:
package handjam.gmiContainer;
import java.util.List;
public class GMIContainer {
public List dataObjects;
public String methodName;
public GMIContainer() {
public void setMethodName(String methodName) {
this.methodName=methodName;
public void setDataObjects(List dataObjects) {
this.dataObjects=dataObjects;
The ActionScript Type:
package generated.handjam.gmiContainer
import flash.utils.*;
import mx.collections.ArrayCollection;
[Bindable]
[RemoteClass(alias="handjam.gmiContainer.GMIContainer")]
public class GMIContainer
private var _dataObjects:ArrayCollection;
private var _methodName:String;
public function GMIContainer()
public function get dataObjects():ArrayCollection {
return _dataObjects;
public function get methodName():String {
return _methodName;
public function set
dataObjects(dataObjects:ArrayCollection):void {
trace("Setting the dataObject from Java = " + dataObjects);
this._dataObjects=dataObjects;
public function set methodName(methodName:String):void {
trace("Setting the methods Name from Java = " + methodName);
this._methodName=methodName;
Code setting the List:
GMIContainer container = new GMIContainer();
List data = new ArrayList();
data.add(id);
data.add(mapItems);
mapItems is a MapItemTypeSeq Java Type
package mil.army.monmouth.webmap.data;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
* Array of MapItemType
* <p>Java class for MapItemTypeSeq complex type.
* <p>The following schema fragment specifies the
expected content contained within this class.
* <pre>
* &lt;complexType name="MapItemTypeSeq">
* &lt;complexContent>
* &lt;restriction base="{
http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="mapItems" type="{
http://www.gmiweb.com/schema/mapdata}MapItemType"
maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MapItemTypeSeq", propOrder = {
"mapItems"
public class MapItemTypeSeq {
protected List<MapItemType> mapItems;
* Gets the value of the mapItems property.
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE>
method for the mapItems property.
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getMapItems().add(newItem);
* </pre>
* <p>
* Objects of the following type(s) are allowed in the list
* {@link MapItemType }
public List<MapItemType> getMapItems() {
if (mapItems == null) {
mapItems = new ArrayList<MapItemType>();
return this.mapItems;
Here is what the JAXWS Java class look like:
package mil.army.monmouth.webmap.data {
import flash.utils.*;
import mx.collections.ArrayCollection;
[Bindable]
[RemoteClass(alias="mil.army.monmouth.webmap.data.MapItemTypeSeq")]
public class MapItemTypeSeq {
public var _mapItems:ArrayCollection;
public function get mapItems():ArrayCollection {
return _mapItems;
public function set mapItems(mapItems:ArrayCollection):void
this._mapItems=mapItems;
when the message comes to my client the flashlog.txt tells me
something like this.
GMIContainer => MapItemTypeSeq
_mapItems = (null)
mapItems = null
Has anyone else ran into this issue with complicated data
objects? All examples I have seen uses very simple
data types.
Thanks for your help,
dk

Hi Martin. The way that AMF serialization/deserialization works for BlazeDS is the same regardless of which service is being used, so yes that code will work for messaging as well. On the server, the serialization/deserialization of messages happens at the endpoint. For an incoming message for example, the endpoint deserializes the message and then hands it off to the MessageBroker which decides which service/destination to deliver the message to.
That was a good question. Thanks for asking it. Lots of people are used to doing custom serialization/deserialization with the RPC services (RemoteObject/RemotingService) but I'm not sure everyone realizes they can do this for messaging as well.
-Alex

Similar Messages

  • FLEX+CAIRNGORM+BLAZEDS+JAVA+DATABASE

    A very simple example for FLEX+CAIRNGORM+BLAZEDS+JAVA+DATABASE.
    http://vijaaay.limewebs.com/forum/viewthread.php?tid=26&extra=page%3D1
    or
    visit  www . flexindia . tk >> Flex Examples
    The attachment zip contains the source  files[ FLEX and JAVA ] and Readme.txt which helps you to setup this  example.
    Regards,
    Vijay

    Yeah i registered, but i couldn't find zip file. Could you please tell me where is that example
    Thanks,
    ApacheFlex.

  • Flex - BlazeDS - Java: int are set to 0 when they should be kept to NULL.

    Hi everyone, I'm having an issue with Flex -> BlazeDS -> Java.
    When I pass an object to Java through BlazeDS, my variables of type int are automatically set to 0 if they are NULL or NAN. Is there a way to keep them as NULL ?
    Thanks everyone.

    Please refer to --
    https://bugs.adobe.com/jira/browse/BLZ-305

  • BlazeDS Java Client + Android

    Has anyone gotten the BlazeDS Java Client running on an android device? I have a amfphp server that I want to talk to from my android app. But I'm getting errors linking the jar files to my project.
    The 2 errors when I import the flex-messaging jar files are below:
    [2010-01-07 12:14:45 - test1]warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.)
    [2010-01-07 12:14:45 - test1]Error generating final archive: duplicate entry: flex/messaging/version.properties
    Thanks
    Phil

    Hi. This looks like an Android issue. I found a couple people with issues that sounded similar to this and they were all trying to build Android apps. Here is one such posting. . .
    http://www.mail-archive.com/[email protected]/msg11579.html//www.mail-archive.com/[email protected]/msg11579.html
    Unfortunately, I didn't see anyone offering a good solution to this problem.
    I still think removing all but one of the version.properties files from the BlazeDS modules/jars will workaround this problem.
    Since you are new to BlazeDS and Java, it might be easier for you to just modify the BlazeDS jars directly rather than rebuilding from source. You can try opening the .jar files in a archiving/extraction tool such a WinZip and removing/deleting the version.properties files from the jars.
    Try that and see if that error you are getting goes away.
    Hope that helps.
    -Alex

  • Mapping ArrayList in java to Actionscript Problem

    Hi Guys,
    This is wrecking my head. Had this issue for the last two days and cannot for the life of me understand why. I have a service defined as with the following method;
    public List getIngredients(){
              List list = null;
              List ingredientList = new ArrayList();
              SandwichDAOFactory fac = SandwichDAOFactory.getDAOFactory(1);
              IngredientDAO ingDao = fac.getIngredientDao();
              IngredientDTO ingDTO = new IngredientDTO();
              Ingredient ing = new Ingredient();
              list = ingDao.getAllIngredients();
              for (Iterator it=list.iterator(); it.hasNext();) {
                   ing = (Ingredient) it.next();
                   ingDTO.setIngredientID(ing.getIngredientID());
                   ingDTO.setName(ing.getName());
                   ingDTO.setPrice(ing.getPrice());
                   ingDTO.setDescription(ing.getDescription());
                   ingDTO.setType(ing.getDescription());
                  ingredientList.add(ingDTO);
              System.out.println("Calling Service");
              System.out.println(list.toString());
              return list;
    Now I have defined a remotes object in my flex app;
    I call this service method when I first load the application;
    retrievalService.getAllIngredients();
    then handle the result as follows;
    private function getAllIngredientsResultHandler(event:ResultEvent):void
                     ingredientsListData =  event.result as ArrayCollection;
                     var arrList:Array = event.result as Array;
                     trace("event.result.toString = "+event.result);
                     trace("ingredientsListData = "+ingredientsListData);
                    trace("arrList = "+arrList);
    I would expect to see the object references delimited in some way for all the trace methods. But when I run the example I get the following output;
    event.result.toString = [object IngredientDTO],[object IngredientDTO],[object IngredientDTO],[object IngredientDTO],[object IngredientDTO]
    ingredientsListData = null
    arrList = null
    I dont understand why this is happening. Surely the variables should contain the same info. I did some debugging and found that the event.result object did in fact contain the data as an ArrayCollection. In addition all the elements were objects of the type IngredientDTO and contained all the relevant fields and data. So again I don't understand for the life of me why its not working.
    Can you not caste an ArrayList in java to an Array or an ArrayCollection?
    Its like the data isn't being mapped or cast properlu from the ArrayList in java to either the Array or the ArrayCollection in actionscript.
    This is driving me insane. Has anyone else had this problem and lived to tell the tale?

    I figured it out. Silly, silly mistake. I was using the wrong import declaration.
    import flex.messaging.io.ArrayList;
    instead of
    import java.util.ArrayList;
    Silly silly...

  • Flex + BlazeDS + Java (works only on localhost)

    Hi!
    I'm new in Flex so I have very incomplete knowledge in many issues. I usually use Java to write applications but now, I need to connect Java with Flex. I read some articles and tutorials about integration using BlazeDS but I still have problem. I made a simple web app and it works, but only on localhost. If I upload my app on server it works but I can't call Java methods.
    Applicaton copy text from TextInput to Label when user press Button.
    Below I add content of some files (remote-config.xml, services-config.xml, web.xml and flex main MXML file)
    remote-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <service id="remoting-service"
        class="flex.messaging.services.RemotingService">
        <adapters>
            <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
        </adapters>
        <default-channels>
            <channel ref="my-amf"/>
        </default-channels>
    </service>
    services-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
        <services>
            <service-include file-path="remoting-config.xml" />      
        </services>
        <channels>
            <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
            </channel-definition>
        </channels>
        <logging>
            <target class="flex.messaging.log.ConsoleTarget" level="Error">
                <properties>
                    <prefix>[BlazeDS] </prefix>
                    <includeDate>false</includeDate>
                    <includeTime>false</includeTime>
                    <includeLevel>false</includeLevel>
                    <includeCategory>false</includeCategory>
                </properties>
                <filters>
                    <pattern>Endpoint.*</pattern>
                    <pattern>Service.*</pattern>
                    <pattern>Configuration</pattern>
                </filters>
            </target>
        </logging>
        <system>
            <redeploy>
                <enabled>false</enabled>
            </redeploy>
        </system>
    </services-config>
    flex-servlet.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:flex="http://www.springframework.org/schema/flex"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/flex
            http://www.springframework.org/schema/flex/spring-flex-1.0.xsd
             http://www.springframework.org/schema/context
             http://www.springframework.org/schema/context/spring-context-3.0.xsd">
        <flex:message-broker>
            <flex:remoting-service default-channels="my-amf"/>
        </flex:message-broker>
        <context:annotation-config />
        <context:component-scan base-package="blah" />
    </beans>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
        <display-name>BlazeDS Spring Integration Application</display-name>
        <description>BlazeDS Spring Integration Application</description>
        <servlet>
            <servlet-name>flex</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
            <servlet-name>RDSDispatchServlet</servlet-name>
            <display-name>RDSDispatchServlet</display-name>
            <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
            <init-param>
                <param-name>useAppserverSecurity</param-name>
                <param-value>false</param-value>
            </init-param>
            <init-param>
                <param-name>messageBrokerId</param-name>
                <param-value>_messageBroker</param-value>
            </init-param>
            <load-on-startup>10</load-on-startup>
        </servlet>
        <servlet-mapping id="RDS_DISPATCH_MAPPING">
            <servlet-name>RDSDispatchServlet</servlet-name>
            <url-pattern>/CFIDE/main/ide.cfm</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>flex</servlet-name>
            <url-pattern>/messagebroker/*</url-pattern>
         </servlet-mapping>
    </web-app>
    FooProject.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:services="services.*">
        <fx:Declarations>
            <s:CallResponder id="sayHelloResult"/>
            <services:FooService id="fooService">
                <services:channelSet>
                    <s:ChannelSet>
                        <s:AMFChannel uri="http://mctg.yoyo.pl/WebContent/messagebroker/amf"/>
                    </s:ChannelSet>
                </services:channelSet>
            </services:FooService>
        </fx:Declarations>
        <s:TextInput id="ti" x="10" y="13"/>
        <s:Label x="10" y="43" text="{sayHelloResult.lastResult}"/>
        <s:Button x="146" y="14" label="Send" click="sayHelloResult.token = fooService.sayHello(ti.text)"/>
    </s:Application>
    The problem is in my opinion in the line wchich is bold. If I change it to <s:AMFChannel uri="http://localhost:8080/WebContent/messagebroker/amf"/> and run on localhost everything is fine. If I upload app on server and call Java method I can only wait for response but I never will get it.
    I realize that similar threads are currently on this forum. I read a few o them but finally I haven't solved my problem yet. I would be grateful for any help.

    Hi ,
    Please check the imapproxy component is in active or inactive state by using the below mentioned command.
    Get-ServerComponentState -identity "servername"
    If it is inactive in state please make it as active.
    Set-ServerComponentState -Identity "server name" -Component imapProxy -Requester HealthAPI -State Active
    Thanks & Regards S.Nithyanandham

  • Serializing between Java and ActionScript

    Hi,
    I am passing from Java to Flex an object which contains a
    EObjectContainmentEList attribute. An EObjectContainmentEList
    implements java.util.List. This list is lost in the serialization
    and I get a null actionscript attribute where I was hoping this
    list would be.
    Is there any way I can resolve this, or is
    EObjectContainmentEList unmappable?
    Thanks

    Don't worry found the problem. No setter for the list in Java
    (only a getter) so it was lost in translation.

  • Having problems mapping Java to ActionScript objects

    I am building a service that returns  a custom object tree to AS3 client over RPC call. Consider a couple of java classes, the TestObject  contains a list of TestInnerObject classes:
    public class TestObject
        public int id = 123;
        public String title = "Test object title";
        public List <String> stringList = new ArrayList<String>();
        public List <TestInnerObject> objectList = new ArrayList<TestInnerObject>();
        public TestObject()
            stringList.add("First string in the list");
            stringList.add("Second string in the list");
            objectList.add(new TestInnerObject(456));
            objectList.add(new TestInnerObject(789));
    public class TestInnerObject
        public int id = 0;
        public String title = "Test inner object title";
        public List <String> stringList = new ArrayList<String>();
        public TestInnerObject(int id)
            this.id = id;
    To work with them on the client a have a couple of the counterpart AS3 classes:
    [Bindable]
    [RemoteClass(alias="test.TestObject")]
    public class TestObject
         public var id:int;
         public var title:String;
         public var stringList:ArrayCollection;
         public var objectList:ArrayCollection;
         public function TestObject()
    [Bindable]
    [RemoteClass(alias="test.TestInnerObject")]
    public class TestInnerObject
         public var id:int;
         public var title:String;
         public var stringList:ArrayCollection;
         public function TestInnerObject()
    My understanding is that such a setup should return result deserialized into objects of TestObject.as and TestInnerObject.as types but I am getting plain AS3 objects that have all the fields but I can not cast them to the required types. This is hardly the optimal way to work with response.
    Could somone clarify what should be fixed?
    Thanks

    Adrian,
    Thanks for the feedback. I added Serializable interface to java classes and confirmed that the package is correct. I am still having the same problem though. Here is the result handler code. May be I am doing something wrong here? When I access result objects as Objects I can get the fields and transfer them to the proper classes (commented lines) but it's hardly efficient. As soon as I try to cast the result I am getting an error.
    private function onResult(result:AcknowledgeMessage):void
               //result.body contains the actual data
                trace("RPC Ok");
                trace(result.body);
                trace(result.body.id);
                trace(result.body.title);
                trace("");
                var testObject:TestObject = result.body as TestObject;
                //var testObject:TestObject = new TestObject();
                //testObject.id = result.body.id;
                //testObject.title = result.body.title;
                //testObject.stringList = result.body.stringList;
                //testObject.objectList = result.body.objectList;
                trace(testObject);
                trace("TestObject id: " + testObject.id);
                trace("TestObject title: " + testObject.title);
                trace("TestObject stringList: " + testObject.stringList);
                for each (var inner:TestInnerObject in testObject.objectList)
                    trace("Inner id: " + inner.id + " Inner tittle: " + inner.title);

  • Java to ActionScript

    I have java code which creates and parses xmls and xsds. I need convert this to action script code. Is there any good tool available to convert java to Action Script ? I tried one tool .. It simply changes the syntax. Its not changing any java imported classes to the matching actions script imports.
    If anybody used any tool .. please show me pointers. Thanks in advance for the help.

    I have java code which creates and parses xmls and xsds. I need convert this to action script code. Is there any good tool available to convert java to Action Script ? I tried one tool .. It simply changes the syntax. Its not changing any java imported classes to the matching actions script imports.
    If anybody used any tool .. please show me pointers. Thanks in advance for the help.

  • Flex, BlazeDS, Java Russian symbols

    Hi, Everyone.
    I have a little problem. If I have a flex application working under Windows and server working under Linux.
    I'm typing string in russian, but on the server i have only "?????". Server and Flex compiled in UTF-8.
    How can I fix this problem?
    Alexey.

    Have you checked Tomcat configuration? digg into that direction

  • A very very strange issue on BlazeDS Deserializing

    Hi all,
    I run into a very very strange issue on BlazeDS Deserializing. Is there any hint or idea?  Thanks a lot!
    Scenario 1:
    Both the browser(firefox or IE) and the midtier (BlazeDS ,java) are on the same machine.
    Actual result:
    Everything works fine.  All the properties in the Flex Object could be mapped to the Java Class
    Scenario 2:
    The browser(firefox or IE) and the midtier (BlazeDS ,java) are on the different machine.
    Actual result:
    Sometimes it works fine.
    And most of the time it does not work fine. Only the data in List is mapped correctly. All the values of simple data type such as int are mapped to 0 .
    Let me simplify the problem.
    The objects of Class B is always stored in the ArrayCollection  assocItems of Class A
    Flex side:
    public class A {
    public var id: int;
    public var  name: String;
    public var assocItems: ArrayCollection=new ArrayCollection();
    public class B {
    public var id: int;
    public var  assocItems : ArrayCollection=new ArrayCollection();
    The id , name in Flex Class A and assocItems in Class B could be  deserialize to correct value .  But the id of Class B is always mapped to 0. This is not correct.
    The log level of BlazeDS is configured to Debug. From the log I can see that  each value is passed from Flex side to Java server side correctly.
    [BlazeDS][INFO] Channel endpoint my-amf received request.
    [BlazeDS][DEBUG] Deserializing AMF/HTTP request
    Version: 3
    (Message #0 targetURI=null, responseURI=/18)
    (Array #0)
    [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
    However, the Java object does not get the correct value of B.id.
    In conclusion,
    1. It’s an issue with only default types
    2. It does not occur every time
    3. It does not occur when the browser(firefox or IE) and the midtier (BlazeDS ,java) are on the same machine
    Have you ever run into the similar problems? And what’s your solution?

    I checked, when I hard-code the constant in linq, the generated sql is like this:
    SELECT "Extent1"."AA" AS "AA"
    FROM (SELECT "TBL"."AA" AS "AA"
    FROM "USERNAME"."TBL" "TBL") "Extent1"
    WHERE ('1062303212007000121' = "Extent1"."AA")
    if I pass a variable to the query with same value, the sql is like this:
    SELECT "Extent1"."AA" AS "AA"
    FROM (SELECT "TBL"."AA" AS "AA"
    FROM "USERNAME"."TBL" "TBL") "Extent1"
    WHERE ("Extent1"."AA" = '1062303212007000121' /* @p__linq__0 */) (@p__linq__0 is passed as parameter)
    The only difference is a paramter. I can't figure out why there is such a impact on performance.

  • Tomcat shutdowing when remote object is calling secondtime from flex to blazeds

    Hi All,
    I am new to flex and started working on that.now i called one remote object from flex through blazeds.its working fine but when i call second time tomcat is  shutdowing .again if i start tomcat it is working fine.
    what is the problem does any one helps?
    sudheer

    Thanks for the tip Joe.
    It's not quite what I was looking for, but it gave me some ideas.
    The blog post describes how to create your own server to handle the file stream. With BlazeDS & Java EE app server there's no need to implement the low level stuff.
    One option would be to read the data on Flex side in chunks and make a request to send each chunk at a time, but I don't know whether this helps at all. Might just slow down the network.
    Another option is to write a custom adapter for BlazeDS endpoint, but I don't know enough details on this to say is it possible or not.
    Third option is to use regular servlet code and Apache Commons FileUpload module.
    Still interested hearing opinions from people working with BlazeDS.

  • Is it possible to pass data from Flex to BlazeDS/POJO as a stream?

    Is it possible to make a remote call to a remote Java object that uses BlazeDS so that the data is gotten as a stream (InputStream)? For example when uploading a file, it would require less memory.
    The BlazeDS examples about file upload that I've seen read the data from file to client memory first with FileReference#load() and after that pass it to the server as ByteArray. By doing so, both client and server need to load the whole file data into memory before it can be passed/processed.
    Thanks.

    Thanks for the tip Joe.
    It's not quite what I was looking for, but it gave me some ideas.
    The blog post describes how to create your own server to handle the file stream. With BlazeDS & Java EE app server there's no need to implement the low level stuff.
    One option would be to read the data on Flex side in chunks and make a request to send each chunk at a time, but I don't know whether this helps at all. Might just slow down the network.
    Another option is to write a custom adapter for BlazeDS endpoint, but I don't know enough details on this to say is it possible or not.
    Third option is to use regular servlet code and Apache Commons FileUpload module.
    Still interested hearing opinions from people working with BlazeDS.

  • Do BlazeDS not support all character of UTF-8 ?

    Our project use Flex 、BlazeDS 、Java.

    I hope you mean you are using Flash CS3? because Flash 3 is from more than 10 years ago and doesn't support AS2 or unicode AFAIK.
    Assuming that you are using CS3 and that your XML file is properly saved as UTF-8. Then the usual problem is that the special character has not been embedded in the text field or that the font doesn't have that character.
    But first are you sure that the file is saved as UTF-8? I ask because many people have come to these forums and say that their file is UTF-8 and we work on it for a couple of days and at the end they find out that it isn't. Just adding the UTF-8 header tag to a text file does not make it UTF-8. Whatever program that created the file must support proper UTF-8 encoding.
    You don't need to do any special escaping or converting the character to html code. If it is unicode just type the character normally. And save your XML file.
    The next thing to check is whether Flash is reading the character correctly. You can do this in a number of ways. What I usually do is have the code that reads the XML and then either trace the nodes from the onLoad handler. Or in the test environment I go to the debug menu and "List Variables." That will show all the variables and their value. If the character shows properly in the output window then you know that the file is encoded properly and that Flash is reading it properly and that the problem must be with the textfield and the font embedding.
    If the character isn't right in the output window then you know that the problem is with the text encoding.

  • JAVA to Flex relation

    Now, we usually use Remote Class Annotation when we convert
    into the JAVA object from
    Action Script 3 Class Object.
    And we doubt when we convert that the declaration of the
    [public] is always necessity or not,
    about the scope of variable declaration in the class of JAVA
    and the class of Action Script 3.
    Please let us know, we should declare of the [public] or
    not.

    From ActionScript to Java, only public, non-static,
    read-writable properties (that is, properties that have both a
    public get and set accessor defined) and public, non-static, vars
    are serialized.
    From Java to ActionScript, only public, non-static,
    non-transient, read-writable bean properties (that is, properties
    that have both a public getter and setter methods defined) and
    public, non-static, non-transient fields are serialized.
    For custom serialization requirements, consider using
    matching flash.utils.IExternalizable and java.io.Externalizable
    implementations that are also registered with the appropriate
    [RemoteClass(alias="...")] metadata.
    There are a few other options on the server for customizing
    serializaiton of strongly typed objects (via the
    PropertyProxyRegistry), but this is a little out of scope for this
    question.

Maybe you are looking for

  • Teaching Myself Python. How Can I Stop The Program From Closing :)

    I wrote a program today that will log into a router here at work and check if the line protocols are up and if i can see thir mac address.  If i run it from the IDLE program it works fine.  When i run it as just crosnet.py it runs fine but closes bef

  • Can anyone help me make sense of bootpd's log entries?

    Up until recently we (at work) had a file server running Linux as our DHCP/DNS server. Once we purchased the Mac and OS X Server however, we started transitioning services over. The last service to be moved over was DHCP, because every time I tried t

  • Macbook display

    My daughter's MacBook (white 13" - last model) has developed a display problem - sometimes it 'greys out' - you can still see the desktop behind but it loks like someone has placed tracing paper over the screen. It is an intermitent problem and somet

  • How does "concurrent request schedule" work in database layer?

    for the EBS concurrent request schedule, what triggers the schedule work? I find no related jobs in database, I don't know what others can realize the schedule of concurrrent requests without database job? thanks! Edited by: easonmy on 24-Apr-2012 20

  • Change loaded movie from child

    Hi, I am new to AS3. Here I want to ask how to change the loaded movie from child? Here is my working code, but it doesn't works... Root: var contentMovie:MovieClip = new mcMain; contentMovie.name="content_mc"; addChild(contentMovie); Child Content: