File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Flex and the fly likes Call servlets in Flex Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Call servlets in Flex" Watch "Call servlets in Flex" New topic

Call servlets in Flex

udara liyanage

Joined: Dec 17, 2009
Posts: 1
i have a servlets in which doPost() and doGet() does not output a XML.
how can I call that servlet and populate the data in a datagrid of Flex mxml file???
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11608

This is something I haven't tried, so you may have to experiment a bit.

The dataGrid is populated from a dataProvider. One possible dataProvider is the HTTPService. The relevant parameters would be:
  • contentType="application/x-www-form-urlencoded|application/xml"
  • resultFormat="object|array|xml|e4x|flashvars|text"

  • Since you can specify that the resultFormat is text, you should be able to use that.

    The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
    It is sorta covered in the JavaRanch Style Guide.
    subject: Call servlets in Flex