0 Replies Latest reply on Apr 21, 2015 5:24 AM by Philarmon

    Get headers from a Coldfusion Flash Remoting RemoteObject to Flex

    Philarmon Level 1

      For some reason, i can't manage to get any headers from a Coldfusion Flash Remoting RemoteObject call in Flex no matter what i try. The headers are always null in both the ResultEvent and the token. Not sure if i am missing something or it is impossible at all? I have seen discussion where people say it is only possible to send headers for a normal HTTP request but also seen discussions about headers for RPC. My main goal is to get a cookie from an RPC call (a session id alone will not help).

      The Facade is the standard Coldfusion setup configured in Project Settigns > Flex Server:

      _serviceControl = new mx.rpc.remoting.RemoteObject();
      .operations = operations;
      .convertResultHandler = com.adobe.serializers.utility.TypeUtility.convertResultHandler;
      .convertParametersHandler = com.adobe.serializers.utility.TypeUtility.convertCFAMFParametersHandler;
      .source = "facade.globalFacade";
      .endpoint = "https://..."

      The call from Flex goes like

      _loginCallResponder = new CallResponder();
      .addEventListener(ResultEvent.RESULT, onLoginResult);
      .addEventListener(FaultEvent.FAULT, onLoginFault);
      .token = _globalFacade.globalDmSec(ApplicationConstants.TOKEN, "LOGIN", "singleSignOn", {}, 30, false);

      The coldfusion part has the setMaintainSession set to true:

      <cfset variables.oWs = createObject("webservice",variables.wsName)>
      <cfset variables.oWs.setMaintainSession(true)>

      Any help and tips is highly appreciated Thank you !