|
Nested CDATA is not allowed!? What crackhead
wrote that spec?
Weird dude, I connected to SOAP with Flash no
problem back in MX, and MX 2004. I know both had different classes, but...
I never actually tried a .NET XML-RPC, but I did try a LiveJournal one.
Not sure what theirs is written in, but I'd get the XML back correctly, whether
I was using my own custom parsing, or Central's built-in support.
I fail to see why Flex can't handle it; hopefully
Matt'll catch this on the next run through.
----- Original Message -----
Sent: Wednesday, November 30, 2005 8:28 AM
Subject: Re: [flexcoders] Flex2 :: XML-RPC (char replacement
nuisance)
Hey Jesse,
The XMLRPC already contains CDATA, and nested
CDATA is not allowed.
Also this is what the specs have to say:
- What characters are allowed in strings?
Non-printable characters? Null characters? Can a "string" be used to hold an
arbitrary chunk of binary data?
Any characters are
allowed in a string except < and &, which are encoded as < and
&. A string can be used to encode binary data.
(
http://www.xmlrpc.com/spec)
So i guess the question
is, how do one return a xml-type in a XmlRPC reply?
Thanks
for your time, and suggetion
Jesse!
Cheers
-michael
On 11/30/05, JesterXL
<[EMAIL PROTECTED]>
wrote:
All jacked character data is supposed to use
CDATA, like so:
<string><![CDATA[<tag>testing</tag>]]></string>
Like the script tag in Flex. Is there not a
way to intercept .NET's response and wrap it?
-----
Original Message -----
Sent: Tuesday, November 29, 2005 6:01 PM
Subject: Re: [flexcoders] Flex2 :: XML-RPC (char replacement
nuisance)
Thanks for the reply Matt,
I got a hold on what's going
on.
When sending a RPC request to the .net, it replies something like
the following:
<?xml
version="1.0"?> <methodResponse>
<params>
<param>
<value>
<string>[HERE BE THE
REPLY/PAYLOAD]</string>
</value> </param>
</params> </methodResponse>
Now because .net regards
what is inbetween <string></string> as a 'payload' wrapped in a
RPC protocol, the data inside these tags cannot have chars like '<',and
'>', since this would potentially invalidate the xml structure of the reply
as a whole. Therefore whatever is between <string></string> is
html-encoded, e.g. < translated to <
Example:
If the service was to return
a xml dodument like
<tag>testing</tag>
the reply
from the service would be:
<?xml
version="1.0"?> <methodResponse>
<params>
<param>
<value>
<string><tag>testing</tag></string>
</value> </param>
</params> </methodResponse>
which is decoded by flex to
a string (Flex correctly interprets the data received as 'raw' data as has no
other choice) and _not_ a xml document. Therefore the data is not passed, and
the Object tree is not created.
I guess other rpc services do not
html-encode the 'payload'?? Flickr(PHP??) seems to work just fine... Is
Microsoft right in doing this encoding?
Anybody out there a genius on
RPC?? (less may also do it
:)
Cheers
-michael
PS. The linefeeds are
definetly not the problem in this case. There's only one type (CRLF), and
tests show that this works just fine. :)
On 11/29/05, Matt
Chotin <[EMAIL PROTECTED]> wrote:
Probably less
people are testing against .NET right now. We do have tests that did
pass but we've also seen some issues with the player (well also the
compiler). The issue that we had internally was one of line-endings
where the XML was mixed in using Windows line endings (CRLF or \r\n) and
Unix (LF or \n). Any way of checking how the service is coming back
(I'd assume since it's .NET that it's CRLF)?
Matt
Hi list,
I'm doing some Xml RPC to .net backend, and
having problems with char replacements.
I call the service, and it
replies something like:
<?xml version="1.0"
encoding="utf-8"?> <tag> </tag>
where
e.g., < is replaced by
<
As a result
flex do _not_ decoding into the desired object-array.
If a do a .aspx
page that write the xml to the document stream i receive
<?xml
version="1.0"
encoding="utf-8"?> <tag> </tag>
and all is
well.
If a do a .net webservice, the payload (i.e. the result) is
also 'char-replaced' and once again flex2 chokes. If I do a .net client that
connects to the webservice all is well.
Who's at 'fault' here? and is
there a way to fix it without writing a custom xmlDecoder? (either on .net
or flex2)
Am I really the only one that have had problems with this
or am I stupid (gotta be realistic sometimes :o)
Cheers
-michael
-- Flexcoders
Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
-- Flexcoders Mailing
List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|