PDA

View Full Version : Load XML to IP and Port (request and response)


zeldawii
10-05-2007, 09:03 AM
I'm new to AutoPlay and have done the following in Flash but will need to do the same in AutoPlay.

Send XML schema in memory to a certain IP and port number. This would be the request.

Then AutoPlay should be waiting for the response in XML as well. Then I could parse it and do what I need with it.

Here is how I did it in Flash Actionscript:


var respFromServer = new XML();
respFromServer.onLoad = respParser;
reqToServerXML.sendAndLoad("http://127.0.0.1:8321", respFromServer);


Is there an equivalent in this application?

Lorne
10-05-2007, 10:41 AM
Not sure exactly, but have a look at the XML actions and HTTP.Submit.

zeldawii
10-05-2007, 11:00 AM
Thanks Lorne.

Where can I find documentation for XML and Http.submit?

Lorne
10-05-2007, 11:21 AM
In the Help file (press F1 inside AutoPlay), under:

Action Reference > HTTP > HTTP.Submit
Action Reference > XML

zeldawii
10-05-2007, 11:58 AM
Thanks! I might be missing something, but the functions don't all me to do the following:

How can I create XML structure in memory?

for example
<test></test>

Worm
10-05-2007, 01:02 PM
So maybe I'm overlooking the obvious, but why not use the FLASH object and your flash app?

zeldawii
10-05-2007, 01:24 PM
There was an application that was previously developed using AutoPlay...so instead of using the flash application that I was developing, it was decided to use the existing AutoPlay application for our demo.

Or else it would be done all in Flash.

Lorne
10-05-2007, 03:26 PM
Thanks! I might be missing something, but the functions don't all me to do the following:

How can I create XML structure in memory?

for example
<test></test>Form it in a string. XML is essentially just a string anyway. If you just want to pass a preset XML string to the server, just store it in a variable as text.

You only need to use the XML actions if you want to form the XML programmatically, building the XML one element or attribute at a time. Note that you can use the XML.SetXML action to "load" XML directly from memory.