Pete, thanks for the response. Yes, you're probably right. It appears
that
the endpoints are not being created. My guess is it has something
to do with
a security setting ( I removed all references to security
in the config
files, as they did not seem necessary). That's just a
wild guess. Here's some
of the log from the stdout.log file.
// from stdout.log
//
*******************************************'
Loading
configuration file
C:\Tomcat
5.5\webapps\metalsmith\WEB-INF\flex\flex-webtier-config.xml,
root
element flex-webtier-config
Loading configuration file
C:\Tomcat
5.5\webapps\metalsmith\WEB-INF\flex\flex-config.xml,
root element
flex-config
06/21 12:13:12 DEBUG configuration service
started.
06/21 12:13:12 DEBUG logger services started.
Loading
configuration file
C:\Tomcat
5.5\webapps\samples\WEB-INF\flex\flex-webtier-config.xml,
root element
flex-webtier-config
Loading configuration file
C:\Tomcat
5.5\webapps\samples\WEB-INF\flex\flex-config.xml,
root element flex-config
[Flex] [INFO] Starting Adobe Flex Data Services 2.0
Express (beta
period ends Jul 31, 2006)
[Flex] [INFO] Adobe Flex Data
Services Build: 138139
[Flex] [INFO] Endpoint my-amf created with security:
None
at
URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/amf
[Flex]
[INFO] Endpoint my-polling-amf created with security: None
at
URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling
[Flex]
[INFO] Endpoint my-http created with security: None
at
URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/http
[Flex]
[INFO] Endpoint my-secure-amf created with security: None
at URI:
https://{server.name}:9100/{context.root}/messagebroker/amfsecure
[Flex]
[INFO] Endpoint my-rtmp created with security: None
at URI:
rtmp://{server.name}:2037
[Flex] [INFO] Endpoint my-secure-http created
with security: None
at URI:
https://{server.name}:9100/{context.root}/messagebroker/httpsecure
[Flex]
[ERROR] Exception when invoking service: data-service
with message: Flex
Message (flex.data.messages.DataMessage)
operation = fill
id =
null
clientId =
495BED4E-B85F-C791-613D-F802D929ADAE
correlationId =
destination = orderRow
messageId =
699A031A-F1DF-2517-DE70-F802D9394E53
timestamp =
1150917204500
timeToLive = 0
body =
[
]
hdr(DSEndpoint) =
my-rtmp
exception: flex.messaging.MessageException: No
destination
'orderRow' exists in service flex.data.DataService
-
Mike
--- In [EMAIL PROTECTED]ups.com,
"Peter Farland" <[EMAIL PROTECTED].> wrote:
>
> Mike,
>
> The fact that the error said the send failed means that perhaps the
RTMP
> channel isn't running... so I'm guessing something went wrong
on
> starting the web application. Most likely the configuration was
invalid.
> Can you look at the server startup output (perhaps in the
console window
> itself or in the web application logs... depending on how
you launched
> Tomcat) for an indication as to whether there were such
errors, and,
> hopefully, a clue as to what is wrong with the
config?
>
> Pete
>
>
>
________________________________
>
> From: [EMAIL PROTECTED]ups.com
[mailto:[EMAIL PROTECTED]ups.com]
On
> Behalf Of Mike_Robinson_98
> Sent: Wednesday, June 21,
2006 2:35 PM
> To: [EMAIL PROTECTED]ups.com
>
Subject: [flexcoders] Flex dataservices:
>
>
>
> I
have read some of the posts on issues similar to this one.
> Especially
the Hank Williams and Peter Farland exchange. However, this
> problem is
different enough that their posts did not help.
>
> I am trying to
adapt the samples examples to work with an app I am
> developing. (BTW,
all the samples work on my Tomcat test server
> running on
Windows.)
>
> The issues I have is a failure when I try to a fill
on a DataService.
> I've attempted to simplify the configuration files but
I must have
> left something out. Anyone who has some experience in this
area may
> easily spot my mistake but I have tried all the changes I can
think of
> without any change in the result.
>
> Here are the
gory details:
>
> // This is the script that creates the data
service and tries to
> populate the orders arraycollection.
>
<mx:Script>
> <![CDATA[
> import
mx.data.DataService;
> import
mx.collections.ArrayCollection;
> import
com.othenos.metalsmith.order.OrderRow;
> public var
ds:DataService;
> [Bindable]
> public var
orders:ArrayCollection;
> [Bindable]
> public var
orderRow:OrderRow;
>
> public function initApp():void{
>
orders = new ArrayCollection();
> ds = new
DataService("orderRow");
> ds.fill(orders);
>
}
> ]]>
> </mx:Script>
>
> // Here is the AS
class that acts as the DTO
> //
**************************************************
>
package com.othenos.metalsmith.order
> {
> import
mx.data.IManaged;
> import mx.data.utils.Managed;
> import
mx.core.MXMLObjectAdapter;
>
> [Managed]
>
[RemoteClass(alias="com.othenos.metalsmith.order.OrderRow")]
>
public class OrderRow
> {
> public var orderID:int;
> public
var orderDate:Date;
> public var orderAmount:Number;
> public
var status:String = "";
> public var salesmanName:String =
"";
> public var customerName:String = "";
> }
>
}
>
> // Part of the Java class that is the Assembler
> //
********************************************************
>
public class OrderAssembler {
> public List loadOrders(){
>
try{
> return orderDao.getOrders();
> }
>
catch(ModuleException me){
> System.out.println("Exception in
getting orders - " +
> me.getMessage());
> }
> return
null;
> }
>
> // The
flex-enterprise-services.xml
> //
****************************************************
>
<?xml version="1.0" encoding="UTF-8"?>
>
<services-config>
>
> <services>
>
<service-include file-path="flex-data-service.xml" />
>
</services>
>
> <channels>
>
<channel-definition id="my-rtmp"
>
class="mx.messaging.channels.RTMPChannel">
>
<endpoint uri="rtmp://{server.name}:2037"
>
class="flex.messaging.endpoints.RTMPEndpoint"/>
>
<properties>
>
<idle-timeout-minutes>20</idle-timeout-minutes>
>
<!-- for deployment on WebSphere, must be mapped to a
> WorkManager
available in the web application's jndi context.
>
>
<websphere-workmanager-jndi-name>java:comp/env/wm/MessagingWorkManager</
>
websphere-workmanager-jndi-name>
> -->
>
</properties>
> </channel-definition>
>
>
</channels>
>
> <logging>
> <!-- You may also
use flex.messaging.log.ServletLogTarget -->
> <!-- You may
also use flex.messaging.log.ConsoleTarget -->
> <target
class="flex.messaging.log.ConsoleTarget"
level="Debug">
> <properties>
> <prefix>[Flex]
</prefix>
>
<includeDate>true</includeDate>
>
<includeTime>true</includeTime>
>
<includeLevel>true</includeLevel>
>
<includeCategory>true</includeCategory>
>
</properties>
> <filters>
>
<!--<pattern>Endpoint.*</pattern>-->
>
<!--<pattern>Service.*</pattern>-->
>
<pattern>Message.*</pattern>
>
<pattern>DataService.*</pattern>
>
<pattern>Configuration</pattern>
>
</filters>
> </target>
> </logging>
>
> <system>
> <redeploy>
>
<enabled>true</enabled>
>
<watch-interval>20</watch-interval>
>
>
<watch-file>{context.root}/WEB-INF/flex/flex-enterprise-services.xml</wa
>
tch-file>
>
>
<watch-file>{context.root}/WEB-INF/flex/flex-data-service.xml</watch-fil
>
e>
>
<touch-file>{context.root}/WEB-INF/web.xml</touch-file>
>
</redeploy>
> </system>
>
>
</services-config>
>
> // The
flex-data-service.xml
> //
******************************************************
>
<?xml version="1.0" encoding="UTF-8"?>
> <service
id="data-service"
> class="flex.data.DataService"
>
messageTypes="flex.data.messages.DataMessage">
>
> <adapters>
> <adapter-definition id="java-dao"
>
class="flex.data.adapters.JavaAdapter"/>
>
</adapters>
>
> <default-channels>
> <channel
ref="my-rtmp"/>
> </default-channels>
>
>
<destination id="orderRow">
>
> <adapter
ref="java-dao" />
>
> <properties>
>
<source>com.othenos.metalsmith.order.OrderAssembler</source>
>
<scope>application</scope>
>
>
<metadata>
> <identity property="orderID"/>
>
</metadata>
>
> <network>
>
<session-timeout>20</session-timeout>
> <paging
enabled="false" pageSize="10" />
> <throttle-inbound policy="ERROR"
max-frequency="500"/>
> <throttle-outbound policy="REPLACE"
max-frequency="500"/>
> </network>
>
>
<server>
> <fill-method>
>
<name>loadOrders</name>
> </fill-method>
>
> <sync-method>
>
<name>syncOrders</name>
> </sync-method>
>
</server>
> </properties>
> </destination>
>
> </service>
>
> // The web.xml
> //
**************************************************************
>
<?xml version="1.0" encoding="ISO-8859-1"?>
>
>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee
>
<http://java.sun.com/xml/ns/j2ee>
"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
>
<http://www.w3.org/2001/XMLSchema-instance>
"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>
<http://java.sun.com/xml/ns/j2ee>
web-app_2_4.xsd"
> version="2.4">
>
>
<context-param>
>
<param-name>contextConfigLocation</param-name>
>
>
<param-value>/WEB-INF/conf/metalsmith-servlet.xml,/WEB-INF/conf/metalsmi
>
th-service.xml,/WEB-INF/conf/metalsmith-data.xml</param-value>
>
</context-param>
>
> <context-param>
>
<param-name>flex.class.path</param-name>
>
>
<param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value>
>
</context-param>
>
> <!-- NOTE: ContextLoaderListener
may not work for all application
> servers. If it does not work for yours,
you must use
> ContextLoaderServlet instead. See page XXX, chapter
8
> for more information. -->
> <listener>
>
>
<listener-class>org.springframework.web.context.ContextLoaderListener</l
>
istener-class>
> </listener>
>
> <!-- Struts
Servlet -->
> <servlet>
>
<servlet-name>action</servlet-name>
>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>
<init-param>
>
<param-name>application</param-name>
>
<param-value>applicationResources</param-value>
>
</init-param>
> <init-param>
>
<param-name>config</param-name>
>
<param-value>/WEB-INF/