Announcement Announcement Module
Collapse
No announcement yet.
Why spring-blazeDS integration always treat the incoming request as AMF0? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why spring-blazeDS integration always treat the incoming request as AMF0?

    I have follow the reference on springsource to integrate spring and blazeDS into my project.

    My project is this Java server that handle the request coming from FMS server, so here are lines of code that send out the request:
    Code:
    var conn = new NetConnection();
    conn.objectEncoding = 3;
    conn.connect("URL to my endpoint" ); //Sorry, system won't let me post the URL, but this line shouldn't be the problem
    conn.call( "authentication.authenticateUser", new result(), username);
    While the same code with slightly change would work for the Adobe BlazeDS example - "samples - product.getProducts()", it doesn't work on my server.

    The exception is AmfMessageDeserializer keep saying my message is AMF0
    Code:
    org.springframework.flex.messaging.servlet.MessageBrokerHandlerAdapter (MessageBrokerHandlerAdapter.java:76) - Channel endpoint channel-amf received request.
    [BlazeDS]01/09/2009 [ERROR] [Endpoint.AMF] Unsupported AMF version 1.
    flex.messaging.MessageException: Unsupported AMF version 1.
    at flex.messaging.io.amf.AmfMessageDeserializer.readMessage(AmfMessageDeserializer.java:93)
    at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:114)
    at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:274)
    Does anyone know why is that?

  • #2
    Finally I found out what's the problem.

    When BlazeDS handle the incoming AMF message, the version of the message is always "1" regardless of the ObjectEncoding is being set to "3" in the SSAS. However AmfMessageDeserializer in 3.0.0.544 will only handle version=0 or 3.

    They fix this issue in 3.2.0.3978 by overwriting the value of version if it is 1 to 0.


    Thanks,
    Alex.

    Comment

    Working...
    X