Libby, It is definitely possible to invoke a servlet from Flex b/c I have done it successfully. If you invoke a custom servlet though, the burden is on you to return data in a format that Flex can understand.
I guess I am wondering why you want to invoke a custom servlet; it seems like you should be invoking the remoting gateway servlet that ships with Flex and automatically handles data (un)marshalling of java objects for you. See the RemoteObject component for more information. good luck, ~harris --- Libby <[EMAIL PROTECTED]> wrote: > > No, I'm returning an array of javabeans. At this > point I am wondering > if it is even possible to call a servlet from Flex > since they don't > have an example of doing it. I have successfully > invoked some other > java objects, but not servlets so far. > > --- In flexcoders@yahoogroups.com, Harris Reynolds > <[EMAIL PROTECTED]> > wrote: > > Libby, > > > > If you are returning a chunck of XML one simple > option > > is to call your servlet using the HTTPService Flex > > control. Using this approach you can attach the > > result to a data provide and Flex will wire it all > up > > for you. An example of this can be found here > [1]. > > It uses a JSP page instead of a servlet, but the > > concept is the same. > > > > Hope this helps, > > > > ~harris > > > > [1] > > > http://flexapps.macromedia.com/flex15/explorer/explorer.mxml > > (See Dynamic Data Services -> HTTP Service) > > > > > > --- Libby <[EMAIL PROTECTED]> wrote: > > > > > > Hello, > > > I am evaluating Flex. We have flash Remoting > calling > > > some servlets > > > running on Websphere 5.1, and for my eval I am > > > trying to build a > > > similiar interface to them. So far I cannot find > an > > > example of how to > > > do this (call a servlet with arguments) so I was > > > hoping someone here > > > could show me a tiny example, or offer > corrections > > > to my code? > > > > > > Using flash, we call a controller servlet using > one > > > or more arguments. > > > ItemDefServlet("getAllRecords"); <-- like this > in > > > Flash > > > > > > In Flex, this is what I have: > > > <mx:RemoteObject type="servlet" > > > source="maintenance.ItemDefServlet" > > > protocol="http" > > > id="remoteobject1"></mx:RemoteObject> > > > > > > > > > <mx:DataGrid id="ItemDef_grd" > > > > dataProvider="{remoteobject2.getMessage.result}"> > > > . > > > . > > > </mx:DataGrid> > > > <mx:ControlBar> > > > <mx:Button label="Get All" > > > click="remoteobject1.send()" /> > > > </mx:ControlBar> > > > thanks, > > > Libby > > > > > > > > > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Small Business - Try our new resources > site! > > http://smallbusiness.yahoo.com/resources/ > > > > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/