function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ccrawfordccrawford 

Can't get Flex example app to run

Hello,

I am trying to use the Flex API (3.1 from Sourceforge) but am having a heck of a time getting it to work.

If I run the salesforce.mxml sample app, with my login/password set I get this error:

Code:
(mx.rpc::Fault)#0
  errorID = 0
  faultCode = "Server.Error.Request"
  faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/9.0"]. URL: http://www.salesforce.com/services/Soap/u/9.0"
  faultString = "HTTP request error"
  message = "faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/9.0"]. URL: http://www.salesforce.com/services/Soap/u/9.0'"
  name = "Error"
  rootCause = (flash.events::IOErrorEvent)#1
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#2
      bytesLoaded = 0
      bytesTotal = 0
      data = (null)
      dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#2
    text = "Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/9.0"
    type = "ioError"

Could this because I am not a "traditional" dev user (I am trying to hit my sandbox on test.salesforce.com)?

I tried to force a server_url of 'https://test.salesforce.com/services/Soap/c/9.0/' or 'https://tapp0.salesforce.com/' but neither of those worked.

Any ideas?



Ron HessRon Hess
I'll put this on the feature list, we've not tested the FLEX library with sandbox (that i know of)

the error message shows that the login is still going to www.salesforce.com, which is not sandbox.
test.salesforce.com should be correct.

you would have to edit library internals to point to test, then step thru the login process to ensure it was going to the correct place.

Can you setup a dev account and run it there, just to be sure nothing else is going wrong and enable your development to move forward?

thanks for reporting this.

ccrawfordccrawford
After I signed up for a Dev account I was able to get it to work. Of course, that means I'm not hitting the data or the customize fields in my sandbox, so that puts a hamper on things.

I was able to get it to work correctly as an S-control (using the session id), so I can do that - just makes it take longer when you have to upload a new swf file for each change during bug fixing.

Thanks for the reply, providing access to any salesforce.com installation (sandbox, regular, or dev) with the APIs would help a ton!

 - Corey
Ron HessRon Hess
ok, if i understand, it works against sandbox when loaded as an scontrol and using the session id passed in, but it fails if run from your local machine when run against test.salesforce.com.

I'll look into it next week. 
Ron HessRon Hess
ok, i set my server url to test and it works to login to sandbox from a local file.

i set this in the connection tag

Code:
<salesforce:Connection id="apex" 
  serverUrl="http://test.salesforce.com/services/Soap/u/9.0" 
  debugEvent="echoToDebugLog(event)" 
  sendRequest="sendRequestListener(event)"/>

 

i then get back in the login response:
 serverUrl = "https://tapp0-api.salesforce.com/services/Soap/u/9.0"
  sessionId = "LMM5irm7GIkpo0BA44....
ccrawfordccrawford
Thanks for the tip, I was able to get it work though my Soap URL is just a bit different (uses a c instead of a u?).

Anyways, thanks a bunch that works! :)

 - ccrawford
Ron HessRon Hess
c is the enterprise wsdl
u is partner wsdl.