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

    Get headers from a Coldfusion Flash Remoting RemoteObject to Flex

    Philarmon

      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();
      _serviceControl
      .operations = operations;
      _serviceControl
      .convertResultHandler = com.adobe.serializers.utility.TypeUtility.convertResultHandler;
      _serviceControl
      .convertParametersHandler = com.adobe.serializers.utility.TypeUtility.convertCFAMFParametersHandler;
      _serviceControl
      .source = "facade.globalFacade";
      _serviceControl
      .endpoint = "https://..."
      ;


      The call from Flex goes like

      _loginCallResponder = new CallResponder();
      _loginCallResponder
      .addEventListener(ResultEvent.RESULT, onLoginResult);
      _loginCallResponder
      .addEventListener(FaultEvent.FAULT, onLoginFault);
      _loginCallResponder
      .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 !