This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 11757

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
    I agree. Here's the link:
    subject: Call servlets in Flex
    It's not a secret anymore!