0 Replies Latest reply on Jun 24, 2009 12:02 PM by Gene Godsey

    Error #1090

    Gene Godsey Level 1

      This will be a simple one for you guys:

      There are 2 files involved: The flex file and the coldfusion file.

       

      I am getting this error for my code base:

      [RPC Fault faultString="Error #1090: XML parser failure: element is malformed." faultCode="Client.CouldNotDecode" faultDetail="null"]
      at mx.rpc.http::HTTPService/http://www.adobe.com/2006/flex/mx/internal::processResult()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\http\HTTPService.as:851]
      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:188]
      at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responde r.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\s rc\mx\messaging\channels\DirectHTTPChannel.as:403]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/onComplete()
      -------------------------------------------------

      The flex file is:

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application

       

       

      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"

      >

       

       

       

      <mx:HTTPService id="userRequest" url="http://localhost/URLTest/uploader.cfm

      "

      useProxy="

       

      false" method="POST"

      >

       

       

      <mx:request xmlns=""

      >

       

       

      <username>{username.text}

      </username>

       

       

      <emailaddress>{emailaddress.text}

      </emailaddress>

       

       

      <color>{color.text}

      </color>

       

       

      </mx:request>

       

       

      </mx:HTTPService>

       

        

       

       

      <mx:Form x="22" y="10" width="493"

      >

       

       

      <mx:HBox>

       

       

      <mx:Label text="Username:"

      />

       

       

      <mx:TextInput id="username"

      />

       

       

      </mx:HBox>

       

       

      <mx:HBox>

       

       

      <mx:Label text="EMail Address:"

      />

       

       

      <mx:TextInput id="emailaddress"

      />

       

       

      </mx:HBox>

       

       

      <mx:FormItem label="Favorite Color"

      >

       

       

      <mx:TextInput id="color"

      />

       

       

      </mx:FormItem>

       

       

      <mx:HBox>

       

       

      <mx:Button label="Submit" click="userRequest.send()"

      />

       

       

      </mx:HBox>

       

       

      </mx:Form>

       

       

       

      <mx:DataGrid id="dgUserRequest" x="22" y="155" dataProvider="{userRequest.lastResult.users.user}"

      >

       

       

      <mx:columns>

       

       

      <mx:DataGridColumn headerText="User ID" dataField="userid"

      />

       

       

      <mx:DataGridColumn headerText="User Name" dataField="username"

      />

       

       

      <mx:DataGridColumn headerText="Email Address" dataField="emailaddress"

      />

       

       

      <mx:DataGridColumn headerText="Color" dataField="color"/>

       

       

      </mx:columns>

       

       

      </mx:DataGrid>

      ---------------------------

      The ColdFusion File is:

      <cfprocessingdirective

       

      pageencoding = "utf-8" suppressWhiteSpace = "Yes">

       

      <cfif

       

      isDefined("username")

       

      and isDefined("emailaddress")

       

      and isDefined("color")

       

      and username NEQ "">

       

       

      <cfquery name="addempinfo" datasource="sample">

       

      INSERT INTO users (username, emailaddress, color)

       

      VALUES (<cfqueryparam value="#username#" cfsqltype="CF_SQL_VARCHAR" maxlength="255">,

       

      <cfqueryparam value="#emailaddress#" cfsqltype="CF_SQL_VARCHAR" maxlength="255">,

       

      <CFQUERYparam VALue="#color#" cfsqltype="cf_sql_varchar" maxlength="150"> )

       

      </cfquery>

      </cfif>

       

       

      <cfquery name="alluserinfo" datasource="sample">

       

      SELECT userid, username, emailaddress, color

       

      FROM users

       

      order by userid desc

       

      </cfquery>

       

       

      <cfxml variable="userXML">

      <users>

       

      <cfloop query="alluserinfo">

       

      <cfoutput>

      <user>

      <userid>#toString(userid)#</userid>

      <username>#username#</username>

      <emailaddress>#emailaddress#</emailaddress>

      <color>#color#</color>

      </user>

       

      </cfoutput>

       

      </cfloop>

      </users>

       

      </cfxml>

       

       

      <cfoutput>#userXML#</cfoutput>

       

      </cfprocessingdirective>

       

       

       

       

      </mx:Application>