I need a little help here with the API. In Flash, in SOLO requests, it
is technically possible to send well formed XML as the raw POST body
content.
We are using the Flash XML.sendAndLoad API. But currently the implementation
treats the raw post body string arg as a single XML TextNode, which
isn't really what
anyone wants, because you get something like "<foo> bar </foo>" sent
as "<foo> bar </foo>",
where all XML special chars are escaped.
I could change the code to parse the postbody string into native Flash
XML, and send that. That
would mean that the data was always treated as well-formed, and in that case I'm
not sure what to do if the XML does not parse properly. I think we can
catch the parse error,
and then revert to the current behavior (which is to treat the string
as a Text node)
Another option is to have a "sendMeAsRaw" flag on dataset, which says
to serialize the dataset data
and send it as the post body. This would seem to be a useful option,
so that people don't have to call
serialize() on one dataset, to set that value as a the "postbody"
string to another dataset just to post it as raw data.
Anyone have any suggestions as to what the best way to proceed here is?
---------- Forwarded message ----------
From: techvibes (JIRA) <[EMAIL PROTECTED]>
Date: Thu, Jul 17, 2008 at 1:00 AM
Subject: [JIRA] Created: (LPP-6683) Raw and Valid XML can not be sent
to server through HTTP Post in SWF SOLO mode
To: [EMAIL PROTECTED]
Raw and Valid XML can not be sent to server through HTTP Post in SWF SOLO mode
------------------------------------------------------------------------------
Key: LPP-6683
URL: http://www.openlaszlo.org/jira/browse/LPP-6683
Project: OpenLaszlo
Issue Type: Bug
Components: LFC - Data
Affects Versions: Pop-tart (4.1.1), RingDing (4.1)
Reporter: techvibes
Assignee: Henry Minsky
In SWF SOLO mode, none of the LzDataset methods (setQueryString,
setPostBody, setQueryParams) can send raw and valid XML to server
through HTTP POST, as the body string gets XML-escaped.
The same methods in DHTML SOLO mode send the post body without
XML-escaping the string. Therefore, this breaks interaction of Laszlo
SWF apps with existing third-party REST Web Services.
Some discussion on this issue can be seen at :
http://www.openlaszlo.org/jira/browse/LPP-6586
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators:
http://www.openlaszlo.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]