Skip to main content
Participant
February 15, 2008
Answered

Webservice and Flash Media Server

  • February 15, 2008
  • 5 replies
  • 640 views
Hi all,

We have got the following task to do...in our organisation we've got an application that generates xml messages. We want to send these messages to Flash clients connected to an FMS server. In order to do that we want to create a webservice (ASP.NET) on the FMS server and let the application send the xml messages to that webservice. Once a message is received by the webservice we want to dispatch it to an FMS application where it would get parsed and based on the content in the message we want to call methodes (over rtmp) on the connected clients.

We have no background on FMS but we thought that it wouldn't be that hard to figure out. By the looks of it it seems almost trivial if you had to do it in Java or .Net. Not so in the world of FMS it seems. The major question we have got is: How do we feed the xml message received by the webservice to an FMS application...or (another solution) how do we notify an FMS application that a new message was received by the webservice. The Google or the manual don't contain examples of any such scenarios. Which makes us asking, "Are we on the right track? Is this the best way to do it?".

Any suggestions, solutions and wisdom are welcome.

Thanks in advance.

Erik

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Correct answer hoyne
    It sounds like you want to push XML messages via FMS to Flash clients from your backend server. The way to do that is to create an XMLSocket in your FMS server script and connect to your backend server(your server needs a socket listener to accept the socket connection which you'll use to send the XML messages over). Once the socket connection is established, your server can send XML messages to your FMS XMLSocket and your FMS server script must implement the onXML method on the XMLSocket object to parse the passed in XML document object. You can then send the message to the Flash client by using the Client.call method. The methodName parameter in Client.call must be an implemented function on the Flash client's NetConnection object.
    I am not sure if your need is to dispatch a message to a particular Flash client or all. If the latter you can iterate over the application.clients(server side script) array to send the message to all Flash clients. If a message from your backend server is destined for a particular client, you must have a way to correlate the message to the right FMS Client instance. However, it sounds like the messages will go to all Flash clients so I won't elaborate further.

    5 replies

    Participant
    February 18, 2008
    Thanks techeye for confirming that my question was clear enough ;-)

    I'll look into your suggestions and see if we can come up with something.

    It is sad to conclude that apparently there is no API to do such a thing. If Adobe wants to conquer the corporate space than they better get their act together fast and provide better intergration and interoperablilty API's or else Silverlight 2.0 and Windows Server 2008 will have a walkover in that space as Microsoft has got that stuff covered pretty well. Just my 2 cents.I hope i'm wrong. I'm always in for a good catfight ;-).

    P.S. This place seems awfully quite for an official forum.

    Erik
    Participant
    February 20, 2008
    Guess that says it all. Disappointing to say the least :-(
    hoyneCorrect answer
    Participant
    February 24, 2008
    It sounds like you want to push XML messages via FMS to Flash clients from your backend server. The way to do that is to create an XMLSocket in your FMS server script and connect to your backend server(your server needs a socket listener to accept the socket connection which you'll use to send the XML messages over). Once the socket connection is established, your server can send XML messages to your FMS XMLSocket and your FMS server script must implement the onXML method on the XMLSocket object to parse the passed in XML document object. You can then send the message to the Flash client by using the Client.call method. The methodName parameter in Client.call must be an implemented function on the Flash client's NetConnection object.
    I am not sure if your need is to dispatch a message to a particular Flash client or all. If the latter you can iterate over the application.clients(server side script) array to send the message to all Flash clients. If a message from your backend server is destined for a particular client, you must have a way to correlate the message to the right FMS Client instance. However, it sounds like the messages will go to all Flash clients so I won't elaborate further.
    Participating Frequently
    February 15, 2008
    This is a good question, I would like to see what some folks respond with. I don't know if there is a SSAS method for which a "push model" to an FMS application would work. For the pull model, I know that one is able to use soap, xmlsockets, xmlstreams, and then poll on an interval. This may be a complete red herring, but perhaps one is able to use amf{php, perl, python} to invoke a method on an fms application for pushing?