Can you check if it works if you comment out the cacheId setting?    Since the 
offline feature also persists configuration, it might be that it has cached 
something invalid.  If it works, you might try removing your shared objects 
(for flash) and sql-lite database files (for air)

  If you could also send me the entire flashlog.txt - (probably offlist - 
[EMAIL PROTECTED] since it is can be big) I'll see if I can track down what is 
going on.

I thing that is helpful to debug config problems is to look at the value of the 
variable mx.messaging.config.ServletConfig.xml - it is the information which is 
compiled into the SWF.   In this case, I'd expect to see the default channels 
for the RTMP channel and then the destination info.   The destination info 
looked correct from the snippet you sent previously so it is the default 
channels part that is messed up.

Jeff

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey
Sent: Sunday, September 21, 2008 8:19 PM
To: [email protected]
Subject: [flexcoders] Re: LCDS: Debug RTMP Traffic


Our endpoints are created in the services-config.xml, and the
destinations for DataServices are configured in
data-management-config.xml.

the RTMP endpoint config is as such:
<channel-definition id="my-rtmp"
class="mx.messaging.channels.RTMPChannel">
<endpoint url="rtmp://localhost:2039"
class="flex.messaging.endpoints.RTMPEndpoint"/>
<properties>
<idle-timeout-minutes>30</idle-timeout-minutes>
</properties>
</channel-definition>

A DataService destination looks like:
<default-channels>
<channel ref="my-rtmp"/>
</default-channels>
<destination id="tasks">
<adapter ref="java-adapter" />
<properties>
<use-transactions>true</use-transactions>
<source>blah.blah.blah.TasksDelegate</source>
<scope>application</scope>
<cache-items>false</cache-items>
<metadata>
<identity property="id"/>
</metadata>
<network>
<subscription-timeout-minutes>0</subscription-timeout-minutes>
<paging enabled="false"/>
</network>
</properties>
</destination>

The two destinations are identical, except for the <source> class.

I am using the compiler argument [-services
"C:\workspace\flex\src\main\webapp\WEB-INF\flex\services-config.xml"],
which points to the correct services-config.xml file.

The task DataService is created in ActionScript like so:
// Create a datasource
__ds = new DataService("tasks");
__ds.cacheID = "ExpTasks";
__ds.autoSaveCache = false;
__ds.autoConnect = false;
__ds.autoCommit = false;
__ds.addEventListener(DataConflictEvent.CONFLICT, onDataConflict,
false, 0, true);
__ds.addEventListener(DataServiceFaultEvent.FAULT, onDataServiceFault,
false, 0, true);

// Connect to datasource
connect();

The connect() method just registers some event listeners and then
calls __ds.connect().

The whole point to this is that we intend to replace our 30 Java
delegates and 130+ remote methods with DataServices so our application
can run in offline mode (assuming there's cached data). If there's a
better way to do this, I'm open to suggestions.

Thanks,
Geoff

--- In [email protected]<mailto:flexcoders%40yahoogroups.com>, Jeff 
Vroom <[EMAIL PROTECTED]> wrote:
>
> Yeah, it looks like somehow you are getting a DataService trying to
use a "DirectHTTPChannel". That only works for for HTTPService, and
WebService. DataService needs a channelSet which supports AMF
(AMFChannel, or RTMPChannel). I'm confused how you are getting into
this situation though... those get created on the client via the
"endpoint" property on some services or you can define one explicitly
in ActionScript or MXML. Can you show how this "tasks" destination
is getting defined in ActionScript? How is its channelSet
specified - on the client via the channelSet property or on the
server? If it is on the server, make sure you are compiling against
the services-config.mxml file (it is a project/compiler option).
>
> Jeff
>
> From: [email protected]<mailto:flexcoders%40yahoogroups.com> 
> [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>]
On Behalf Of Geoffrey
> Sent: Sunday, September 21, 2008 5:04 PM
> To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Re: LCDS: Debug RTMP Traffic
>
>
> TraceTarget reported the following when the UI with the second
> DataService loads:
>
> 'C44F8220-F189-21B2-CC03-874C13991A33' producer set destination to
> 'DefaultHTTP'.
> 'direct_http_channel' channel endpoint set to
http://localhost:8080/main/
> 'cds-consumer-tasks-null' consumer set destination to 'tasks'.
> Configuration for destination='tasks':
>
> <properties>
> <metadata>
> <identity property="id"/>
> </metadata>
> <network>
> <paging enabled="false"/>
> </network>
> <use-transactions>true</use-transactions>
> </properties>
> New DataService for destination: tasks
> '19BCB91C-2215-DC18-D015-874C6044FDA8' producer set destination to
> 'tasks'.
> Creating a new independent data store for destination: tasks
> Adding data service: tasks to the data store: null initialized: false
> LSODatabase close(): null
> TaskDS.as: Connecting to DataService.
> 'ds-producer-tasks' producer connected.
> 'ds-producer-tasks' producer acknowledge of
> '1EBA99AC-11A5-3E3B-0B1C-874C60449CA4'.
>
> This is the last thing it reports related to DataServices. It looks
> like the DataService attempts to connect, but I'm missing all the
> connection jazz that I get from the first DataService connection
> (namely RTMP stuff. Am I reading this right? Looks like it's trying
> to connect over an HTTP channel). Here's what a successful connection
> looks like:
>
> ConfigDS.as: Connecting to DataService.
> 'my-rtmp' channel endpoint set to rtmp://localhost:2039
> 'my-rtmp' channel settings are:
> <channel id="my-rtmp" type="mx.messaging.channels.RTMPChannel">
> <endpoint uri="rtmp://localhost:2039"/>
> <properties/>
> </channel>
> 'my-rtmp' channel got connect attempt status. (Object)#0
> code = "NetConnection.Connect.Success"
> description = "Connection succeeded."
> details = (null)
> DSMessagingVersion = 1
> id = "A66F4650-DB1E-E678-DB08-C1CD3BF2591A"
> level = "status"
> objectEncoding = 3
> 'my-rtmp' channel is connected.
> 'ds-producer-configurationData' producer acknowledge of
> '0ADAF447-0616-0F7B-376A-8758AC3385D9'.
> 'ds-producer-configurationData' producer connected.
> ConfigDS.as: Connection to DataService success.
>
> --- In
[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
"Geoffrey" <gtb104@> wrote:
> >
> > I'll try using the TraceTarget class.
> >
> > Our config uses port 2039 for RTMP. I tried filtering on
> "tcp.port==2039", but that didn't
> > seem to get anything. I also tried "rtmp.port==2039" and
> "rtmpt.port==2039". Those
> > didn't seem to work either. By 'work' I mean that when the filter
> was applied, there were
> > no network activity listed in the Wiresshark top panel.
> >
> > Any other ideas on filtering?
> >
> > --- In
[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
 Jeff
Vroom <jvroom@> wrote:
> > >
> > > Have you tried enabling the client side debug logging with
> <mx:TraceTarget/>? You
> > get the highest level client side tracing that way... just make sure
> you use the debug
> > player, then look in the flashlog.txt.
> > >
> > > For wireshark, I think you can probably filter based on the server
> port used to establish
> > the connection. Look at your RTMP configuration but typically it
> is 2038 or 1935 or
> > something like that.
> > >
> > > Jeff
> > >
> > > From:
[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
>
[mailto:[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>]
On Behalf Of
> > Geoffrey
> > > Sent: Friday, September 19, 2008 7:35 PM
> > > To: 
> > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > > Subject: [flexcoders] LCDS: Debug RTMP Traffic
> > >
> > >
> > > I'm having some issues with 2 DataServices running over RTMP. The
> > > first DataService loads on application startup and work fine (I get
> > > data). The second load later on in the application, but this one
> > > get's no data. It doesn't appear that it even makes the connect
> > > request because my result and fault handlers don't get hit.
> > >
> > > Is there a tool (like Charles, ServiceCapture, or Wireshark)
that can
> > > be used to verify that something over an RTMP channel is being sent
> > > from the client? Like I said, nothing seems to happen when I issue
> > > the DataService.connect() call.
> > >
> > > I've enabled a bunch of logging on the server(via the
> > > services-config.xml file), but if that traffic isn't reaching the
> > > server, all the logging in the world won't help.
> > >
> > > BTW, if you say that Wireshark can be used, then please post the
> > > filter you use because I couldn't figure out one that only
showed RTMP
> > > traffic. As a matter of fact, I couldn't find anything that looked
> > > like RTMP traffic in the log session.
> > >
> > > I don't know if it's important or not, but the server and the client
> > > are all running locally.
> > >
> > > Env:
> > > Tomcat 6.0.16
> > > LCDS 2.6
> > > Flex 3
> > >
> > > Thanks,
> > > ~Geoff
> > >
> >
>

<<inline: image001.jpg>>

<<inline: image002.jpg>>

Reply via email to