|
-
Jan 7th, 2007, 06:04 PM
#1
Thread Starter
Member
[RESOLVED] saving XML packet to file
Hi there I have a flash application that will send an XML packet to a asp.net server application (.aspx file).
I know how to sen the XML packet to the .aspx file but does anyone know how i get the .aspx file to save the xml packet back to an xml file, i have found loads of PHP exsaples that are realy simple but I need to do this in asp.net.
hope sone has an idea cant fined any realistic and simplke links.
want to know more just ask
lee
-
Jan 9th, 2007, 09:10 AM
#2
Re: saving XML packet to file
-
Jan 9th, 2007, 10:47 AM
#3
Thread Starter
Member
Re: saving XML packet to file
Hi there thanks for the tutorial link that was a great example but only tells you how to create a XML document in ASP.NET does not tell you how to recieve an XML packet(being snet from flash) and then save this to an XML file
anmore ideas would be greatfuly recieved
lee
-
Jan 9th, 2007, 11:05 AM
#4
Re: saving XML packet to file
But you said:
I know how to sen the XML packet to the .aspx file
-
Jan 10th, 2007, 09:33 AM
#5
Thread Starter
Member
Re: saving XML packet to file
Hi there
I know what I said and i can send the xml packet to the asp.net page, but that page then need to take that packet and save it to an xml file. This is what I cant do. The xml file already excists just need to save the packet sent from flash back to the server
any ideas
lee
-
Jan 10th, 2007, 09:55 AM
#6
Re: saving XML packet to file
How is it being sent then? As a GET? POST?
-
Jan 10th, 2007, 10:16 AM
#7
Thread Starter
Member
Re: saving XML packet to file
Hi there it is sent from flash using actionscript in the sef
testxml.SendandLoad(" /test.aspx", textxml) the data is POST
hope this helps
lee
-
Jan 11th, 2007, 11:04 AM
#8
Re: saving XML packet to file
You can then get the data sent in the ASPX page using Request.Form["fieldname"]. Where fieldname is the parameter specified in the body of the xml that you've sent. Example:
Code:
thexmlpacket=<something><blah><blahdyblah>dkfj</blahdyblah></blah></something>
So in that case, you would look for Request.Form["thexmlpacket"]
-
Jan 11th, 2007, 11:57 AM
#9
Thread Starter
Member
Re: saving XML packet to file
that great thanks but how when I have it in the aspx page do i save it
is that code c# or vb
lee
-
Jan 14th, 2007, 03:20 PM
#10
Thread Starter
Member
Re: saving XML packet to file
I cant belive through all the forums and tutorials I have been trough I finaly worked it out
It works I can now update load XML into flash, update thge XML instance and send that instance to an ASP.NET web service as a XML packet
The ASP.NET web service then saves the XML packet back to the origonal XML file and it all happends in the background
Cool
I must say though that there isnt alot of information on how to do this type of thing using ASP.NET
Anyone else have this problem jsut ask maybee i can post the answer if enough people require it
help me heeps
thanks to all thatr helped me achieve this
lee
-
Jan 17th, 2007, 04:11 PM
#11
Re: [RESOLVED] saving XML packet to file
I think you should post the answer anyways because people often search these forums for answers and if they come across your post, they won't even need to ask.
-
Jan 18th, 2007, 07:22 AM
#12
Thread Starter
Member
Re: [RESOLVED] saving XML packet to file
no probs mate
in the end the code required was very short
but I guess when no one knows how to do it doesnt matter how big the code is.
The code is in 'VB' within the asp.net page
here it is
'page load event handler
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim xmlDoc, FilePath
xmlDoc = New XmlDocument
xmlDoc.Load(Request.InputStream)
FilePath = Server.MapPath("")
xmlDoc.Save(FilePath + "\filename.xml")
End Sub
then in flash
xmlDoc.sendAndLoad("default.aspx", returnXML, "POST");
any questions just ask, hope this helps other as i have spent about 5 weeks to get this to work
lee
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|