Sorry for the terse description - it's been a little busy here!

 

For Point 1, the stuff you have there looks like the server itself is
starting up fine.   The issue is that when you compile your SWF, the
tool you use to compile your SWF also should refer to the
services-config.xml file.  If you are using flex builder, there is a
setting for that in your project properties.   If you are requesting the
MXML file directly from the browser (where the server compiles the mxml
file to produce the SWF), this is in your flex-config.xml file.  If you
are compiling using ant or the command line compiler there is a
-services option to the compiler.   

 

For Point 2, since you do not set the "channelSet" property on your
Consumer component, you need to follow the step in point 1.  There is
another option where the client downloads the configuration for your
destination from the server when it connects.  But for that to work, you
need to specify the URL to the server so it can connect in the first
place.  You do that with the channelSet property.  

 

For Point 3, you can see this by adding the MXML tag:

 

 <mx:TraceTarget/>

 

If you are using the debug player, you'll see some diagnostics in the
flashlog.txt file.  That gets buried in the user's home directory on
windows under application data/macromedia/flash player/logs.  Make sure
you have the debug player though since the release player doesn't output
trace information.  You can also get to this property directly in
actionscript with:

 

   import flex.messaging.config.ServerConfig;

 

 

   ....

 

   trace(ServerConfig.xml);

 

Jeff

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Geoffrey
Sent: Thursday, February 14, 2008 1:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: BlazeDS - Unknown destination error

 

I hate to say it, but I don't know how to do any of that.

-- Point 1 --
"[point] your compiler at the services-config.xml which defines those
destinations"
Here are a couple lines of debug output from the console. I think I'm
pointing to the correct config files.
[Flex] [Configuration] BlazeDS - Community Edition: 3.0.0.353
[Flex] [Configuration] Endpoint my-streaming-amf created with
security: None
[Flex] [Startup.Destination] Destination with id 'userTopic' is
ready (startup time: '0' ms)
[Flex] [Startup.Service] Service with id 'message-service' is ready
(startup time: '0' ms)
[Flex] [Startup.MessageBroker] MessageBroker with id '__default__'
is ready (startup time: '407' ms)
So to me, that part of the configuration is correct.

-- Point 2 --
"define a channel set on the client and set the channelSet property on
your service"

This is my code in main.mxml to define my consumer:
<mx:Consumer id="userConsumer" destination="userTopic"
message="onUsersFeed(event)"/>

And the corresponding code in AS to subscribe to the destination.
public function onCreationComplete():void
{ 
// Subscribe to destination
userConsumer.subscribe();
}

Am I doing something wrong here? I basically took this from one of
the BlazeDS samples.

-- Point 3 --
"You can see what destinations are getting compiled into your app via
the static variable: flex.messaging.config.ServerConfig.xml"
I don't know how to access this variable. Is this a Java variable?

Thanks for the help, and sorry for me being so dense.
Geoff

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Jeff Vroom" <[EMAIL PROTECTED]> wrote:
>
> Make sure that either you are pointing your compiler at the
> services-config.xml which defines those destinations or you need to
> define a channel set on the client and set the channelSet property on
> your service. 
> 
> 
> 
> You can see what destinations are getting compiled into your app via
the
> static variable: flex.messaging.config.ServerConfig.xml. That should
> be a subset of the info from services-config.xml if you are compiling
> stuff in.
> 
> 
> 
> Jeff
> 
> 
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of Geoffrey
> Sent: Thursday, February 14, 2008 11:28 AM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] BlazeDS - Unknown destination error
> 
> 
> 
> I'm trying to get BlazeDS working with our existing Flex application.
> When the application starts and tried to subscribe to a publisher, I
> get the following error:
> 
> [MessagingError message='Unknown destination 'userTopic'.']
> at mx.messaging.config::ServerConfig$/getChannelSet()
>
[C:\dev\enterprise_bali\frameworks\mx\messaging\config\ServerConfig.as:2
> 24]
> ...
> 
> I have the topic defined in my messaging-config.xml file like this:
> <destination id="userTopic"></destination>
> 
> Not really sure what the deal is. I've converted our app to use the
> Flex 3 plugin for Eclipse, and that seems OK (not sure if I really
> needed to do this). The only thing I see is that the properties of
> the main flex project say "Project is being compiled with Flex 3.0,
> but server has Flex 2.0.1" in the Flex Compiler section. Ummm, say
what?
> 
> Any help would be appreciated.
>

 

Reply via email to