I18N, Sending from flex to Java server

Hi
I'm doing a flex application for client and Java for server
side.
i want to send the name of the user to the server.
<Code>
var loader:URLLoader = new URLLoader();
var vars:URLVariables = new URLVariables();
vars.name = name <-or-> vars.name = escape(name)
var req:URLRequest = new URLRequest(URL_SERVLET);
req.data = metaDataVars;
loader.load(req)
</Code>
When i get the parameters in the server i get them in gybrish
if some
enters it's name in for example Chinease, or Arabic.
the Java function URLDecoder.decode(name) doesn't help
what should i do?
thanks,
-arki

Hi
I'm doing a flex application for client and Java for server
side.
i want to send the name of the user to the server.
<Code>
var loader:URLLoader = new URLLoader();
var vars:URLVariables = new URLVariables();
vars.name = name <-or-> vars.name = escape(name)
var req:URLRequest = new URLRequest(URL_SERVLET);
req.data = metaDataVars;
loader.load(req)
</Code>
When i get the parameters in the server i get them in gybrish
if some
enters it's name in for example Chinease, or Arabic.
the Java function URLDecoder.decode(name) doesn't help
what should i do?
thanks,
-arki

Similar Messages

  • Database access from flex thro java objects

    Please tell me how to access the data from the MS SQL server
    through a java object and connect it to flex and display the data
    in flex.
    please provide me the code for this assignment.
    Thanks in Advance.
    Selvakumar.

    What would you consider when choosing between FDS and PHP
    (via HTTP) for mySQL communication?
    My app doesn't need to be real time but I am concerned about
    the load on the webserver running PHP. Is that a typical point of
    failure?

  • MFC Client cannot send message to a Java Server

    Hi All,
    I have a Java Server which listens on a TCP Socket. The client is a MFC based application and needs to communicate with the Server using simple raw text messages.
    We were able to connect to the Java Server using CSocket and CAsyncSocket objects but were not able to send messages.
    This is the code that we are trying:
    mySock = new CAsyncSocket(); // mySock is a CAsyncSocket object.,
    mySock->Create();
    mySock->Connect(strIP,lngPort);
    mySock->Send(strMessage, nSize);
    The server log shows that the connection is established, but the message doesnt reach.
    Please help !
    Thanks !!
    Sudhakar.

    I have the same problem.
    The Java (server) end is straightforward...
    Ian
    import java.io.*;
    import java.net.*;
    public class Serv extends Thread
         public static final int PORT = 3011;
         public static final String REQUEST = "REQUEST";
         /** Test */
         public static void main(String[] args)
              Serv s = new Serv();
              s.start();
         Serv()
              try
                   // Real code will set this class to be a daemon thread as we want it to stop is the main thread stops
                   //ss.setDaemon(true);
                   m_serverSocket = new ServerSocket(PORT);
              catch (IOException ex)
                   ex.printStackTrace();
         public void run()
              try
                   while (true)
                        // Launch a handler when a client connects:
                        final Socket clientSocket = m_serverSocket.accept();
                        ClientHandler clientHandler = new ClientHandler(clientSocket);
                        System.out.println("(Client " + clientHandler.getClientHostname() + " accepted on port " + PORT + ")");
                        clientHandler.start();
              catch (IOException ex)
                   ex.printStackTrace();
         private class ClientHandler extends Thread
              ClientHandler(Socket clientSocket)
                   try
                        setDaemon(true);
                        m_clientSocket = clientSocket;
                        m_socketWriter = new PrintWriter(new BufferedOutputStream(m_clientSocket.getOutputStream()));
                        m_socketReader = new BufferedReader(new InputStreamReader(m_clientSocket.getInputStream()));
                   catch (IOException ex)
                        ex.printStackTrace();
              public void run()
                   try
                        //m_socketWriter.println(getAlarmSummaryString());
                        //m_socketWriter.flush();
                        while (true)
                             final String request = m_socketReader.readLine();
                             System.out.println("Client request: " + request);
                             if (request.equals(REQUEST))
                                  m_socketWriter.println("RESPONSE");
                                  m_socketWriter.flush();
                             else
                                  m_clientSocket.close();
                                  break;
                   catch (SocketException ex)
                        System.out.println("(Client " + getClientHostname() + " disconnected)");
                   catch (IOException ex)
                        ex.printStackTrace();
              private String getClientHostname()
                   return ((InetSocketAddress)m_clientSocket.getRemoteSocketAddress()).getHostName();
              private Socket m_clientSocket;
              private PrintWriter m_socketWriter;
              private BufferedReader m_socketReader;
         private ServerSocket m_serverSocket;
    }

  • Send from file to http server and save http/xml response to another file

    Hallo,
    is there anybody who made running simple think. Read xml file, send it to http server using plain HTTP adapter and then wait for response which is to be saved as another file?
    ThanX a lot.
    Honza Vrzak

    Hello Honza,
    I've made running these two asynchronous scenario. Maybe that might help you?
    1.a) FileAdapter picks up XML and sends it to XI2.0
    1.b) XI uses PlainHTTP-Adapter to sends the message to Webserver
    1.c) HTTPRequestHandler (written in C#) receives the XML and writes it to HD.
    2.a) JavaScript sending an XML to PlainHTTP adapter of XI2.0.
    2.b) XI sends the message to FileAdapter
    2.c) FileAdapter writes the XML to HD
    What you need is an synchrounus scenario and I think I remember that the fileadapter is not able to work synchrounus. So I think you have to combine these two scenarious to one.
    Regards Björn

  • How to send event from flex extension to other flex extension in InDesign?

    I have two extensions created using flex for InDesign. I need to send an event from one of these extensions and capture that event in other extension. How can it be done? Please help me.

    Hi,
    What I believe that data cannt be send from flex to java as hash maps...... we can send data from flex to java, but this data can be in form of array, string or boolean value..... Then the data can be send using ExternalInterface...............
    and if it is web application you need to use java script in between to communicate and if it is desktop application you can send data using MERAPI...
    MERAPI will act as a bridge for sending data from java to flex and vice versa... and you can send any type of data using merapi.

  • XA transactions in ATMI java server

    hello
    I've found out that XA support in Java ATMI servers (tuxedo12, patch level004, linux/x86_64) is limited to: ORACLEXA DERBYXA DB2XA SQLSERVERXA MYSQLXA.
    is there a documentation that describes list of Java/XA enabled databases?
    what about informix?
    Exception in thread "Thread-0" TPERMERR(16):0:0:TPED_MINVAL(0):QMNONE(0)::ERROR: Create XA connection with <com.informix.jdbcx.IfxXADataSource:***:jdbc:informix-sqli://***:***/***:INFORMIXSERVER=***...> failure. (The DataSource does not support XA :com.informix.jdbcx.IfxXADataSource)
    at com.oracle.tuxedo.tjatmi.TuxRmJDBC.open(TuxRmJDBC.java:169)
    at com.oracle.tuxedo.tjatmi.TuxRmManager.openRM(TuxRmManager.java:86)
    it looks like hardcoded limit in com.oracle.tuxedo.tjatmi_12.1.1.0.jar

    xml configuration:
    <ClassPaths>
    <ClassPath>testsrv.jar</ClassPath>
    <ClassPath>/opt/ibm/informix/ids/jdbc/lib/ifxjdbcx.jar</ClassPath>
    <ClassPath>/opt/ibm/informix/ids/jdbc/lib/ifxjdbc.jar</ClassPath>
    </ClassPaths>
    (which is informix driver version: 3.70.JC7, db=informix 11.70fc7 on local machine, database is logged,
    I am able to connect to it through simple jdbc "HelloWorld.java" and C-atmi servers are connecting
    to this database without problem)
    <DataSources>
    <DataSource name="informix">
    <DriverClass>com.informix.jdbcx.IfxXADataSource</DriverClass>
    <JdbcDriverParams>
    <ConnectionUrl>jdbc:informix-sqli://***:***/***:INFORMIXSERVER=***...</ConnectionUrl>
    </JdbcDriverParams>
    </DataSource>
    </DataSources>
    java server starts and runs fine when it is not in group with resource manager. when I move it to
    the informix group I get:
    at com.oracle.tuxedo.tjatmi.TuxRmJDBC.open(TuxRmJDBC.java:169)
    at com.oracle.tuxedo.tjatmi.TuxRmManager.openRM(TuxRmManager.java:86)
    and exception with message "The DataSource does not support XA". the question is: where does this message come from?
    the java server does not make any contact to database (found that using network spy tool = no data
    to/from informix listen port)
    trace:
    094443.louise!TMJAVASVR.3981.2414987040.0: 01-28-2013: Tuxedo Version 12.1.1.0, 64-bit
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:tr: trace("*:ulog:dye")
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:tr: dye
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:tr: trace("*:ulog:dye")
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:tr: dye
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:tr: trace("*:ulog:dye")
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:tr: dye
    094443.louise!TMJAVASVR.3981.2414987040.0: LIBTUX_CAT:262: INFO: Standard main starting
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: { tpsvrinit(17, "TMJAVASVR -C dom=whatever -g 300 -i 1500 -u louise -U /home/tuxdev/tuxwhatever/ulog/ulog -m 0 -r -- -c jtest.xml")
    094443.louise!TMJAVASVR.3981.2414987040.0: TUXJ_CAT:150: INFO: "/home/tuxdev/tuxwhatever/app/exe/jtest.xml" is used as the configuration file for current TMJAVASVR.
    094443.louise!TMJAVASVR.3981.2414987040.0: TUXJ_CAT:120: INFO: "/opt/oracle/tuxedo/tuxedo12.1.1.0/udataobj/tuxj/TJSconfig.xsd" is used as the schema file for the configuration file "/home/tuxdev/tuxwhatever/app/exe/jtest.xml" for current TMJAVASVR.
    094443.louise!TMJAVASVR.3981.2414987040.0: TUXJ_CAT:144: INFO: XA support enabled.
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: { tpadvertise("testperf1", 0x0x4047f2)
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: } tpadvertise = 1 [tperrno TPENOENT]
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: { tpadvertise("testperf2", 0x0x4047f2)
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: } tpadvertise = 1 [tperrno TPENOENT]
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: { tpadvertise("testsvc1", 0x0x4047f2)
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: } tpadvertise = 1 [tperrno TPENOENT]
    094443.louise!TMJAVASVR.3981.2414987040.0: TUXJ_CAT:140: INFO: Total 3 services are advertised.
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: { tpadvertise("..TJSADM_300_1500", 0x0x403f88)
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: } tpadvertise = 1 [tperrno TPENOENT]
    094443.louise!TMJAVASVR.3981.2414987040.0: TRACE:ia: } tpsvrinit = 0 [tperrno TPENOENT]
    094443.louise!TMJAVASVR.3981.2252502784.-2: TRACE:ia: { tpsetctxt(1, 0x0)
    094443.louise!TMJAVASVR.3981.2252502784.1: TRACE:tr: trace("*:ulog:dye")
    094443.louise!TMJAVASVR.3981.2252502784.1: TRACE:tr: dye
    094443.louise!TMJAVASVR.3981.2252502784.1: TRACE:ia: } tpsetctxt = 0
    094443.louise!TMJAVASVR.3981.2252502784.1: LIBTUX_CAT:6126: INFO: New server dispatched thread starting
    094443.louise!TMJAVASVR.3981.2244110080.-2: TRACE:ia: { tpsetctxt(2, 0x0)
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:tr: trace("*:ulog:dye")
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:tr: dye
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:ia: } tpsetctxt = 0
    094443.louise!TMJAVASVR.3981.2244110080.2: LIBTUX_CAT:6126: INFO: New server dispatched thread starting
    094443.louise!TMJAVASVR.3981.2252502784.1: TRACE:ia: { tpopen()
    094443.louise!TMJAVASVR.3981.2252502784.1: TRACE:xa: { xa_open(0x0x1c21e90, 0, 0x0)
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:ia: { tpopen()
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:xa: { xa_open(0x0x1c3c990, 0, 0x0)
    094443.louise!TMJAVASVR.3981.2252502784.1: TUXJ_CAT:362: Open XAResource Result "ERROR: Create XA connection with <com.informix.jdbcx.IfxXADataSource:whatever:jdbc:informix-sqli://***:> failure. (The DataSource does not support XA :com.informix.jdbcx.IfxXADataSource)".
    094443.louise!TMJAVASVR.3981.2252502784.1: TRACE:xa: } xa_open = -3
    094443.louise!TMJAVASVR.3981.2244110080.2: TUXJ_CAT:362: Open XAResource Result "ERROR: Create XA connection with <com.informix.jdbcx.IfxXADataSource:whatever:jdbc:informix-sqli://***:> failure. (The DataSource does not support XA :com.informix.jdbcx.IfxXADataSource)".
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:xa: } xa_open = -3
    094443.louise!TMJAVASVR.3981.2252502784.1: LIBTUX_CAT:466: ERROR: tpopen TPERMERR xa_open returned XAER_RMERR
    094443.louise!TMJAVASVR.3981.2252502784.1: TRACE:ia: } tpopen = -1 [tperrno TPERMERR]
    094443.louise!TMJAVASVR.3981.2252502784.1: TUXJ_CAT:142: ERROR: Failed to open resource manager.
    094443.louise!TMJAVASVR.3981.2244110080.2: LIBTUX_CAT:466: ERROR: tpopen TPERMERR xa_open returned XAER_RMERR
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:ia: } tpopen = -1 [tperrno TPERMERR]
    094443.louise!TMJAVASVR.3981.2244110080.2: TUXJ_CAT:142: ERROR: Failed to open resource manager.
    094443.louise!TMJAVASVR.3981.2252502784.1: LIBTUX_CAT:6256: ERROR: tpsvrthrinit() failed
    094443.louise!TMJAVASVR.3981.2252502784.1: TRACE:ia: { tpclose()
    094443.louise!TMJAVASVR.3981.2252502784.1: TRACE:ia: } tpclose = 1
    094443.louise!TMJAVASVR.3981.2244110080.2: LIBTUX_CAT:6256: ERROR: tpsvrthrinit() failed
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:ia: { tpunadvertise("testperf1")
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:ia: } tpunadvertise = 1
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:ia: { tpunadvertise("testperf2")
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:ia: } tpunadvertise = 1
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:ia: { tpunadvertise("testsvc1")
    094443.louise!TMJAVASVR.3981.2244110080.2: TRACE:ia: } tpunadvertise = 1
    your JDBCConnectionParam.getDataSourceType_internal has hardcoded db names and there is no informix there so it
    becomes TuxConstants.DataSourceType.OTHER
    eventually JDBCConnectionParam.supportXA method called on this object returns true only for hardcoded values (and
    'false' for DataSourceType.OTHER). when it returns false TuxConnectionManager.java throws exceptiona that ends
    with XAER_RMERR

  • Can't Send From IMAP Mail Accounts

    I set up 4 different email accounts within Mail. The send button is grey'd out on the 3 IMAP style account setups. Send is only active when I choose to send from the Gmail outgoing server. How can I fix this while still using the IMAP style which enables my Push with my new iPhone to work?
    Thanks!

    Okay, so I have yet to solve this. Here's what's happening now.
    All of my 4 email account are set up as IMAP but now I'm only receiving gmail on my iPhone and I'm not seeing any new mail from the other IMAP accounts on iPhone. What the heck?
    Anybody?

  • Use Window's scriptcontrol eval to parse JScript response from Java Server

    I've been asked to create a program to send and receive data to our Java Server. I've never worked with Java or even HTML before but there is some working code written in VB that I've been working from to get me started. I have successfully made connection to the server using IWinHttpRequest which returns a parse-able string. In the VB code they used MSScriptControl.IScriptControl to parse the returned string into an object that they could query for different parameters like 'returnStatus' and 'returnType'. This seems like a great advantage over parsing the string in LabVIEW. However, the return of this functions is a variant that seems to be just an 'object'. I am not very familiar with LVOOP or OOP in general and so I have no idea what to do with this 'object'. I've tried creating a LVObject that contained a control for all the parameters in the return string, then take the variant from the scriptcontrol and Type Set it as my LVObject and remove the parameters through the Object's cluster. But that didn't seem to work. I would like to know if this possible or should I give up and just go with the long yet sure way.
    I am using LabVIEW 8.5.1 on an XP machine. I think this would be easier if I had 8.6 or 2009 but alas I don't.
    Attached is my trial VI
    Attachments:
    JSONProxy.vi ‏32 KB

    Peter, Thanks for your reply. The problem is I am not creating the object, Window's ScriptControl 'eval' function (an ActiveX Invoke Node) is returning the object as a variant. I understand the general concepts of OOP which is why I think I know what the object is 'composed' of but I don't know how to get the individual parts of the object into a form I can work with within LabVIEW. Since I do think I know what data is in the object, I tried to type case the variant as a LV Object who's cluster contained a control for each piece of data with the label of the control being the name of a part of the object but it didn't seem to work.
    For example, if the string returned from WinHttpRequest was {"returnType":"True","returnStatus":"StringArray"} and I sent this throught the 'eval' function, the returned object would have 2 parameter: a string labeled "returnType" having a value of "True" and another string labeled "returnStatus" having a value of "StringArray". I tried creating a LV Object that had two string controls labled "returnType" and "returnStatus" in it's cluster. I then created a constant of this LV Object and type cast the variant using this constant then tried to read one of the strings within the LV Object. The result was the default value of an empty string.
    I think this should be the way to accomplish my goal but either I'm wrong or there is some nuance that I am missing.
    Thanks for any insight provided.
    Tessa

  • Can we use MIDP 1.0 to send SMS from mobile phone to server

    hello,
    I want to develop MIDlet which send sms from mobile phone to server
    using midp 1.0
    and also if any one knows about the mobile phone which suppoet midp 1.0 (java enabled) then tell me
    thanks in advance
    s.j.koradiya

    hi,
    SMS API(WMA) is an optional package. It is not a MIDP1.0 or MIDP2.0 api's.
    There are phones which has WMA api with MIDP1.0 support .... Nokia 3650
    Seimens has some phone with their own api's to send sms.Check out seimens site for more info
    BTW, What do you mean buy sending SMS to Server????
    If you want to send message to server you can do it with Http.
    HTH
    phani

  • How do I send email from Flex?

    I would like to send an email from Flex.  Searching through the forum I found the same question unanswered from a long time at and found answers on how to setup Flex as the POP3 get email client.  But my needs are much simpler.  I just want to send an email.
    Anyone ever do this?

    The common approach is to do this sort of work on the server; and just have Flex ping a remote service.  It is very easy to send e-mail in most server side software..
    In theory you could use socket classes to hook up to an SMTP server to send e-mail directly from Flex, but since the other, common, ways are so easy I can't imagine it is worth the time.

  • I have 4 email accounts in apple Mail.  My mail is sending from the wrong account.  even on "reply" it sends from a different account.  I have 3 gmail accounts and one exchange server account. I choose which account to send from and it still sends from a

    I have 4 email accounts in apple Mail.  My mail is sending from the wrong account.  even on "reply" it sends from a different account.  I have 3 gmail accounts and one exchange server account. I choose which account to send from and it still sends from the same gmail account.  Help.

    I HAD two accounts because of this problem.  I completely removed the problem account from the Apple Mail client.  Guess what is happening??  That's right - Mail is still sending from the other account that no longer exists on my computer, and I have absolutely no idea how this is happening.  This is incredibly frustrating.  When a recipient chooses to reply to my message, quite often I won't get it now because it is going to the other account that has now been deleted from my system.  COME ON APPLE!!! WHAT'S THE DEAL WITH THIS???

  • What should be done in certmap.conf for 2-way SSL support from a standalone Java application to an SSL enabled LDAP Server

    To support certficate based client authentication using 2-way SSL from a standalone java application which uses JNDI and JSSE1.0.2 to connect to an SSL enabled LDAP Server how do we configure the certmap.conf?Is there any additional setup required at the LDAP Server side apart from enablinf SSL with the option"Required Client Authentication" enabled.The 2 way SSL handshake goes through but the access log file (After configuring the certmap.conf for the issuer DN of the client certficate etc..)shows SSL failed to LDAP DN?But inspite of this access log error the Java client does get an SSL Connection object with which it is able to connect to the LDAP.IS the certmap.conf file being looked up by the LDAP Server at all?

    have you out.flush() and out.close() before you call connection.getInputStream()?

  • Creating an xdp file from flex/java application

    Hi,
    I have an application in Flex 4  and As 3.When I click a button in flex application I have to generate a file in java with
    extension xdp.When I try this locally(Run as java application) the file is generating  correctly.When i compile the applic
    ation and try it, the file is not writing correctly.Do someone have any idea about creating an xdp file from flex application?
    i am using blazeds to connect java and flex4.When i opens the file in notepad the file is writing correctly.There is only problem in openig an xdp file...
    please help me.

    specifically:
    Runtime.getRuntime().exec("filename.exe")

  • How to access a file in Unix server from windows using java

    I want to access a file in unix server from windows using java program.
    I have the following code. I am able to open the url in a web browser.
    String urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    URL url = new URL(urlStr);
    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream)));
    String inputLine;
    while((inputLine=in.readLine()))!=null){
    System.out.println(inputLine);
    in.close();
    I get the following error
    java.io.FileNotFoundException: /javatest/test.csv
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:333)
    at java.net.URL.openStream(URL.java:960)
    at com.test.samples.Test.main(Test.java:45)

    urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    I have given the format of the urlStr that I am using in the code. The actiual values are used in my code. I have tried pasting this url in the browser and it opens the file.

  • I can't send an e-mail from thunderbird, it was working well, suddenly it says the following message:An error occurred while sending mail. The mail server respo

    i can't send an e-mail from thunderbird, it was working well though , suddenly it says the following message:An error occurred while sending mail. The mail server responded An error occurred while sending mail. The mail server responded: (Alis-MacBook-Air.local) [46.138.187.135]:51054 is currently not permitted
    OR
    i have changed the port from 587 to 465 but still cannot send e-mail, it keep sending and sending for 5 minutes and respond is time out?

    Can you post your Troubleshooting Information?
    Help (Alt-H) - Troubleshooting Information

Maybe you are looking for