Orkut Gmail Calendar Documents Web more »
Help | Sign in
Google Groups Home
JSON Problem
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rutwick Gangurde  
View profile  
 More options Nov 18 2009, 3:55 pm
From: Rutwick Gangurde <rutwick.gangu...@gmail.com>
Date: Wed, 18 Nov 2009 02:25:37 -0800 (PST)
Local: Wed, Nov 18 2009 3:55 pm
Subject: JSON Problem
Hello Everyone...
       Im doing a little JSON assignment (pasted below whatever i've
done till now). My Flex App should hit a server (i've put in the url)
and get the 'Welcome to XYZ server' from there and display it. But Im
getting a lot of errors. I have included the core library in my
project.
Havent done any JSON stuff before,so duno wat these errors are...
PLEASE HELP....

Code here:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="getmessage.send()">
        <mx:Script>
                <![CDATA[
                        import com.adobe.serialization.json.JSON;
                        import mx.rpc.events.ResultEvent;

                        private function getMessageFromServer(event:ResultEvent):void
                        {
                        var rawData:String=String(event.result);
                        var msg:String = (JSON.decode(rawData) as String);
                        var recievedMessage:String=new String(msg);
                        serverMessage.text=recievedMessage;
                        }
                ]]>
        </mx:Script>

        <mx:HTTPService id="getmessage" method="GET" resultFormat="text"
url="http://174.129.221.212:8989/solr/" useProxy="false"
result="getMessageFromServer(event)">
        </mx:HTTPService>

        <mx:Panel width="250" height="200" layout="absolute" title="JSON
talks to the server!" themeColor="#229EB1" backgroundColor="#C3E4F0"
borderColor="#24F092" horizontalCenter="-9" verticalCenter="-7"
cornerRadius="8">
        <mx:Label text="Hello !"  id="serverMessage" x="89" y="45" width="52"
textAlign="center"/>
        <mx:Button label="Click" id="getButton" x="89" y="99"
borderColor="#42DFB1" fillAlphas="[1.0, 0.6, 0.6, 0.6]"
fillColors="[#37CE7A, #EBEEDD]"/>
        </mx:Panel>
</mx:Application>
=========================================================================== =================================================================

Errors here:

Error: Unexpected < encountered
        at com.adobe.serialization.json::JSONTokenizer/parseError()[C:
\Development\ContractProjects\Adobe\as3corelib\src\com\adobe
\serialization\json\JSONTokenizer.as:546]
        at com.adobe.serialization.json::JSONTokenizer/getNextToken()[C:
\Development\ContractProjects\Adobe\as3corelib\src\com\adobe
\serialization\json\JSONTokenizer.as:171]
        at com.adobe.serialization.json::JSONDecoder/nextToken()[C:
\Development\ContractProjects\Adobe\as3corelib\src\com\adobe
\serialization\json\JSONDecoder.as:86]
        at com.adobe.serialization.json::JSONDecoder()[C:\Development
\ContractProjects\Adobe\as3corelib\src\com\adobe\serialization\json
\JSONDecoder.as:63]
        at com.adobe.serialization.json::JSON$/decode()[C:\Development
\ContractProjects\Adobe\as3corelib\src\com\adobe\serialization\json
\JSON.as:81]
        at jsonApp/getMessageFromServer()[C:\Documents and Settings\admin\My
Documents\Flex Builder 3\jsonApp\src\jsonApp.mxml:11]
        at jsonApp/__getmessage_result()[C:\Documents and Settings\admin\My
Documents\Flex Builder 3\jsonApp\src\jsonApp.mxml:18]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/
internal::dispatchRpcEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc
\src\mx\rpc\http\mxml\HTTPService.as:290]
        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/
internal::resultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc
\src\mx\rpc\AbstractInvoker.as:193]
        at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects
\rpc\src\mx\rpc\Responder.as:43]
        at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks
\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
        at DirectHTTPMessageResponder/completeHandler()[C:\autobuild
\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels
\DirectHTTPChannel.as:403]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google