Hi Serkan,

OK, sound like you found the right fix.

Thanks,
-Alex

From: Serkan Taş <serkan....@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <users@royale.apache.org>
Date: Friday, March 15, 2019 at 11:58 PM
To: "users@royale.apache.org" <users@royale.apache.org>
Subject: Re: Work on Emulation

Alex,

In flex, it goes through the first case in if statement, not the second one :  
(The flex version send body method is attached)

The parameters variable comes as string to the method. Current sendBody assumes 
that the "parameters" is always XML. But if we check if it is as string than 
the enters the first case. (emulation of sendBody is attached)



if (parameters is String && xmlEncode == null)
                {
                    paramsToSend = parameters as String;
                } else {
                    paramsToSend = parameters.toXMLString();
                }



Thanks,
Serkan
16.03.2019 09:40 tarihinde Alex Harui yazdı:
Hi Serkan,

That doesn’t make sense to me.  Is the same code (before your proposed changes) 
in the Flex version of AbstractOperation?  If so, then how does 
parameters.toXMLString() not throw an exception in Flex?

-Alex

From: Serkan Taş 
<serkan....@likyateknoloji.com><mailto:serkan....@likyateknoloji.com>
Reply-To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>
Date: Friday, March 15, 2019 at 11:28 PM
To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>
Subject: Re: Work on Emulation

Hi Alex,

I checked the flow in debug and can say that there is no conversion for XML, it 
is just string and I guess we have to check it and than use it as string.

If change the AbstractOperation.sendBody as below :

if (ctype == CONTENT_TYPE_XML)
            {

                if (parameters is String && xmlEncode == null)
                {
                    paramsToSend = parameters as String;
                } else {
                    paramsToSend = parameters.toXMLString();
                }

then in js debug :

[cid:part1.DBF1439D.1E2291C8@likyateknoloji.com]

can see that is passes.

Thanks,
Serkan
15.03.2019 06:55 tarihinde Alex Harui yazdı:
If the Flex version works and in the Flex version a string is being passed into 
authAndCall yet in Operation it is XML, we need to understand where Flex code 
or the Flash runtime converted the string back to XML.  So you might need to 
check again more carefully at the Flex version.

Then we will know where we might want to put similar conversion code.

Thanks,
-Alex

From: Serkan Taş 
<serkan....@likyateknoloji.com><mailto:serkan....@likyateknoloji.com>
Reply-To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>
Date: Thursday, March 14, 2019 at 1:55 PM
To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>
Subject: Re: Work on Emulation

Alex, I already debugged the flex code and then sent the code pieces.
Although autheandcall method has parameter as string, the method 
loginresulthandler create and xml and passes the xml string as parameter.
Ant the flex version works as expected.
Tomorrow I will send you the orginal flex debug results of 
abstractoperation.sendbody method call.
Note: I ll take care of event casting issue later.



Thanx
Serkan
Android için 
Outlook<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fghei36&data=02%7C01%7Caharui%40adobe.com%7C254e7fbf783f4c2ba97d08d6a9dcd691%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636883163301294907&sdata=1CMbK1gCL%2FxRqbKcxbVXBc6Vv1YDkO8elB8dKX94BvQ%3D&reserved=0>'u
 edinin





On Thu, Mar 14, 2019 at 11:46 PM +0300, "Alex Harui" 
<aha...@adobe.com<mailto:aha...@adobe.com>> wrote:
Hi Serkan,

In the code you posted, it looks like “authAndCall” has a “parameter” that is a 
String.  It is not obvious to me how parameter could be XML.  I suggest that 
debug into that first before changing any emulation code.

Also, you may have to pay close attention to code like 
XML(event.target.data).result.  That converts event.target.data to XML (I 
hope), but what you get from the “result” property may not be XML or XMLList as 
it might be in Flash so there might need to be another cast or coercion.  
Again, debugging into it and comparing against the Flash version may help.

HTH,
-Alex







Reply via email to