The fact that RemoteObject uses a servlet is an "implementation detail". You can see that it is by looking at the [FLEX_APP]/WEB-INF/web.xml file in your Flex application. It is the servlet named "AMFGatewayServlet".
With regard to your problem, depending on how your code is factored, you may be able to use RemoteObject out of the box. Typically you would surface a remote object that provided a service.... In your case you could create a Java object called JavaBeanService (or whatever) and expose a method on it that returned all your java beans. The point here is that you don't need to muck around with HTTP level stuff as is the case with your servlet. Flex handles that using Flash remoting. good luck, ~harris --- Libby <[EMAIL PROTECTED]> wrote: > > Well, my custom servlet already exists. I have read > all I can find on > RemoteObject and have not discovered any mention of > servlet, either > mine or flex's. Could you tell me exactly where you > are looking to get > your info? > Thanks, > Libby > > --- In [email protected], Harris Reynolds > <[EMAIL PROTECTED]> > wrote: > > 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 [email protected], 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/ > > > > __________________________________ 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/

