0
votes

(This is the first time I've done this actually.)

  <mx:HTTPService id="post_update" method="POST" result="{Dumper.info('bye')}"/>

The result handler above is just for debugging purposes, but its never hit, even though what I'm uploading via POST...

          post_update.url = getPath(parentDocument.url)+"update";                               
          post_update.send(new_sel);       

...is received and handled successfully by my Django view:

def wc_post(request) :    
    request.session['wc'] = request.POST      
    return http.HttpResponse("<ok/>", mimetype="text/xml")

As far as what I'm sending back from Django, I'm following the guidelines here:

Sending Images From Flex to a Server

I just don't want it to generate an error on the Flex side considering Django is actually receiving and processing the data. Any help appreciated. Can't remember the text of the error in Flex at the moment.

UPDATE: new_sel (what I'm posting from Flex) is just a Flex Object, with various text fields.

UPDATE: various error messages from event.message (in fault handler):

faultCode = "Server.Error.Request"
faultString = "HTTP request error"; DSStatusCode = 500; errorID = 2032; type = "ioError"

2
did you forget to include the error you seeing on the Flex Side?JeffryHouser
I didn't forget it, it was just rather terse, and I don't understand why I should be getting any errors. I'll have to remember how I generated the error message. But the main thing is, the result handler is never hit on the Flex side because of that error, even though there is actually no error in Django.Mark
faultCode = "Server.Error.Request"Mark
faultString = "HTTP request error"; DSStatusCode = 500; errorID = 2032; type = "ioError"Mark
Please explain more detailed what's going on. What is performed first, what next... When / where appears what. A sequence diagram (somehow) would be helpful.SteAp

2 Answers

0
votes

This is more grasping at straws than answers, but do I have to send a particular type of header back from Django- the default sent by Django includes a 200 success status code, and the response I was sending of "<ok/>" with mime type of "text/xml" was following the example exactly that I provided from that other source.

And also the url I'm sending the POST to is localhost:8000/wr_view1/wr_webcube/update, and I previously successfully did a GET to localhost:8000/wr_view1/wr_webcube/webcube.xml, and despite the .xml extension in the case of GET, it was still being handled by Django (and without errors in Flex). In the case of this POST, once again, the data is actually succesfully sent and handled by Django, but Flex is returning Error 2032, which I found out can mean numerous different things including cross domain issues, but don't see how that's the case here.

0
votes

Just had to return HttpResponse("ok") Didn't like it being sent as xml for some reason. So much ado about nothing I guess.