Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 反序列化时已丢弃AMF正文_Apache Flex_Coldfusion_Blazeds_Amf_Livecycle - Fatal编程技术网

Apache flex 反序列化时已丢弃AMF正文

Apache flex 反序列化时已丢弃AMF正文,apache-flex,coldfusion,blazeds,amf,livecycle,Apache Flex,Coldfusion,Blazeds,Amf,Livecycle,我试图通过BlazeDS对ColdFusion服务器进行一个简单的FlexAMF调用。使用RemoteObject,我尝试向服务器发送登录请求,并成功或失败地响应。出于某种原因,当数据到达BlazeDS时,消息体在反序列化过程中被丢弃(我认为)。这是我的ColdFusion/BlazeDS日志代码以及CFC和Flex ActionScript调用 非常感谢您的帮助。谢谢! [BlazeDS]Channel endpoint my-cfamf received request. [BlazeDS]

我试图通过BlazeDS对ColdFusion服务器进行一个简单的FlexAMF调用。使用RemoteObject,我尝试向服务器发送登录请求,并成功或失败地响应。出于某种原因,当数据到达BlazeDS时,消息体在反序列化过程中被丢弃(我认为)。这是我的ColdFusion/BlazeDS日志代码以及CFC和Flex ActionScript调用

非常感谢您的帮助。谢谢!

[BlazeDS]Channel endpoint my-cfamf received request.
[BlazeDS]Deserializing AMF/HTTP request
Version: 3
  (Message #0 targetURI=null, responseURI=/3)
    (Array #0)
      [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
        source = "service.UserService"
        operation = "authenticateUser"
        destination = "ColdFusion"
        timestamp = 0
        headers = (Object #1)
          DSEndpoint = "my-cfamf"
          DSId = "883A97CF-4A08-0B8E-9056-1BF562A40EB4"
        body = (Array #2)
          [0] = "Username"
          [1] = "Password"
        clientId = null
        messageId = "D1743AB9-54B8-E73C-85C7-E990DE7F1ECE"
        timeToLive = 0

[BlazeDS]Before invoke service: remoting-service
  incomingMessage: Flex Message (flex.messaging.messages.RemotingMessage) 
    operation = authenticateUser
    clientId = 883AAF5D-900B-410A-1E8B-3B3FBD6552A6
    destination = ColdFusion
    messageId = D1743AB9-54B8-E73C-85C7-E990DE7F1ECE
    timestamp = 1300998708880
    timeToLive = 0
    body = null
    hdr(DSId) = 883A97CF-4A08-0B8E-9056-1BF562A40EB4
    hdr(DSEndpoint) = my-cfamf


-- Flex
            remoteUserService = new RemoteObject;
            remoteUserService.destination = "ColdFusion";
            remoteUserService.source = "service.UserService";
            remoteUserService.authenticateUser.addEventListener("result",  authenticate_requestComplete);
            remoteUserService.authenticateUser.addEventListener("fault",  authenticate_requestFailure);     
            remoteUserService.authenticateUser({username:username, password:password});

-- ColdFusion

    <cffunction name="authenticateUser" access="remote" returnType="Struct">
        <cfargument name="username" type="string">
        <cfargument name="password" type="string">


        <cfset ret = getAuthenticationService().authenticate(username, password) />

        <cfreturn ret>
    </cffunction>
[BlazeDS]通道端点my cfamf收到请求。
[BlazeDS]反序列化AMF/HTTP请求
版本:3
(消息#0 targetURI=null,responseURI=/3)
(数组#0)
[0]=(键入对象#0'flex.messaging.messages.RemotingMessage')
source=“service.UserService”
操作=“authenticateUser”
destination=“ColdFusion”
时间戳=0
标题=(对象#1)
DSEndpoint=“my cfamf”
DSId=“883A97CF-4A08-0B8E-9056-1BF562A40EB4”
body=(数组#2)
[0]=“用户名”
[1] =“密码”
clientId=null
messageId=“D1743AB9-54B8-E73C-85C7-E990DE7F1ECE”
timeToLive=0
[BlazeDS]在调用服务之前:远程处理服务
incomingMessage:Flex消息(Flex.messaging.messages.RemotingMessage)
操作=验证器
客户ID=883AAF5D-900B-410A-1E8B-3B3FBD6552A6
目的地=ColdFusion
messageId=D1743AB9-54B8-E73C-85C7-E990DE7F1ECE
时间戳=1300998708880
timeToLive=0
body=null
hdr(DSId)=883A97CF-4A08-0B8E-9056-1BF562A40EB4
hdr(DSEndpoint)=我的cfamf
--弯曲
remoteUserService=新的RemoteObject;
remoteUserService.destination=“ColdFusion”;
remoteUserService.source=“service.UserService”;
remoteUserService.authenticateUser.addEventListener(“结果”,authenticate\u请求完成);
remoteUserService.AuthenticateSer.addEventListener(“错误”,身份验证请求失败);
remoteUserService.authenticateUser({用户名:用户名,密码:密码});
--冷饮

为什么不将凭证作为两个字符串传递,而不是创建一个对象?这样,它们将显示在CF中的arguments作用域中。或者,您可以将它们打包到数据传输对象中,但这似乎有些过分。

为什么不将凭据作为两个字符串传递,而不是创建一个对象?这样,它们将显示在CF中的arguments作用域中。或者,您可以将它们打包到数据传输对象中,但这似乎有点过头了。

它将这些参数转换为数组。这似乎不对。这些值也是大写的。这就是你从柔性侧传递的信息吗?Flex端的“用户名”对象是什么?只有一个字符串?请提供发送对象的Flex代码。@James,是的,从Flex传递的值只有两个字符串。对于我设置的测试,我只发送了每个字段的测试字符串“Username”和“Password”。在RemoteObject参数中,用户名和密码只是字符串。我将它们放入一个对象中,因为这就是我被指示通过RemoteObject调用传递变量的方式。这有意义吗?谢谢你的帮助@这是我发送对象的代码:`public function authenticate(username:String,password:String):void{remoteUserService.authenticateUser({username:username,password:password});}`数据作为数组进入服务器仍然很奇怪。尝试在ActionScript中创建一个包含这些属性的类型化值对象,并发送该对象而不是普通对象。它将这些参数转换为数组。这似乎不对。这些值也是大写的。这就是你从柔性侧传递的信息吗?Flex端的“用户名”对象是什么?只有一个字符串?请提供发送对象的Flex代码。@James,是的,从Flex传递的值只有两个字符串。对于我设置的测试,我只发送了每个字段的测试字符串“Username”和“Password”。在RemoteObject参数中,用户名和密码只是字符串。我将它们放入一个对象中,因为这就是我被指示通过RemoteObject调用传递变量的方式。这有意义吗?谢谢你的帮助@这是我发送对象的代码:`public function authenticate(username:String,password:String):void{remoteUserService.authenticateUser({username:username,password:password});}`数据作为数组进入服务器仍然很奇怪。尝试在ActionScript中创建一个具有这些属性的类型化值对象,并发送该对象而不是普通对象。在使用Nic之后,我们发现我试图使用ColdSpring Singleton与flex通信。这是不可能的,因为每个HTTP请求都会创建一个新的CFC实例。Coldspring不允许这样做,这就是AMF失败的原因。现在我有了一个remoteProxy,它将请求传递给服务,一切都很好。谢谢在与Nic合作后,我们发现我试图使用ColdSpring单例与flex通信。这是不可能的,因为每个HTTP请求都会创建一个新的CFC实例。Coldspring不允许这样做,这就是AMF失败的原因。现在我有了一个remoteProxy,它将请求传递给服务,一切都很好。谢谢