0

I have recently started using Flash Builder and the Flex SDK. I am currently working with XML. I am able to read XML into a List perfectly using the following code:

<s:HTTPService id="myXML" url="http://www.mywebsitename.com/appdata/Apps.xml"/>
<s:List id="myList" x="58" y="127" width="205" height="133" textAlign="center" dataProvider="{myXML.lastResult.JacobsApps.Name}"></s:List>

The problem that I am having is writing to the XML. I need to use HTTPService, or a similar service that uses URLs to write to the XML file.

vascowhite
  • 18,120
  • 9
  • 61
  • 77
RMK-Jacob
  • 209
  • 1
  • 4
  • 15

1 Answers1

0

A URL is generally designed to request data from a server; and a URL alone won't create a file on the server.

You'll need to write a service in your language of choice. .NET, Java, ColdFusion, and PHP Are a few server side languages that will do this and integrate well with Flex. Specific instructions on how to do this depend on the technology of choice. With ColdFusion I would use cffile.

Once you create your service on the server, you'll be able to call the service from Flex using RemoteObject for AMF calls, WebService for SOAP calls, or HTTPService for REST calls. More info on accessing remote data services with Flex.

JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
  • @RMK-Jacob "http://www.mywebsitename.com/appdata/Apps.xml" gives you data. so every time you call this url and this url gives you a XML data. when you want to add/ write back some tag in XML that means you want to change this file. so this is not handy to make a link which read and write a file. As Mr. www.Flextras.com say you must write a code which add a tag in your XML file in your server side language. – JK Patel Jan 03 '13 at 19:12
  • @RMK-Jacob The services will need to be on your server. A Flex browser application will not be able to create or edit files on your server directly. – JeffryHouser Jan 03 '13 at 19:20
  • @www.Flextras.com Thanks. Do you know of any tutorials that teach how to write a service in Java? – RMK-Jacob Jan 03 '13 at 19:28
  • @www.Flextras.com or of a Tutorial that teaches how to create a service in .net? – RMK-Jacob Jan 03 '13 at 19:42
  • I don't know of any tutorials explicitly; but I'm sure you'll find plenty of information with a Google Search. – JeffryHouser Jan 03 '13 at 20:22